1.典型信号:
单位脉冲序列,单位阶跃序列,矩形序列,实指数序列,正弦序列,负指数序列,周期序列
(1)常用信号的MATLAB表示
>> t = 0:0.0001:0.2;
>> x = sawtooth(2*pi*50*t,1);%锯齿波
>> subplot(321);plot(t,x);
>> x = sawtooth(2*pi*50*t,0.5);%三角波
>> subplot(322);plot(t,x);
>> x = square(2*pi*50*t);%方波
>> subplot(323);plot(t,x);axis([0,0.2,-1.5,1.5]);
>> x = tripuls(t,0.1);%非周期三角波
>> subplot(324);plot(t,x);axis([0,0.2,-0.1,1.1]);
>> x = rectpuls(t,0.1);%非周期方波
>> subplot(325);plot(t,x);axis([0,0.2,-0.1,1.1]);
>> t = -5:0.1:5;x = sinc(t);
>> subplot(326);plot(t,x);axis([-5,5,-0.4,1.1]);
(2)对应图像
常用函数.png2.常用信号的运算:
信号加,信号乘,幅度变化,移位,折叠,采样和,采样积,信号能量
>> n = -3:3;
>> x = [1,2,3,2,1,4,3];
>> N = length(x);
>> m = 2;n1 = 1;n2 = 3;
>> subplot(231);stem(n,x);%信号
>> y = [zeros(1,m) x];%信号移位
>>subplot(232);stem(y);
>> title('信号移位');
>> y = fliplr(x);subplot();%信号折叠
>> subplot(233);stem(n,y);
>> title('信号折叠');
>> y = sum(x(n1:n2));%信号和
>> subplot(223);stem(y);
>> title('信号和');
>> y = prod(x(n1:n2));%信号积
>> subplot(224);stem(y);
>> title('信号积');
>> Ex = sum(abs(x).^2);%信号能量
>> Px = sum(abs(x).^2)/N;
对应图像:
信号的运算.png
网友评论