离散时间信号的位移,则可看作是将表示时间的向量平移,而表示对应时间点上的值的向量不变。
离散时间信号的反转,则可以看作是将表示时间的向量和表示对应时间点上的值的向量以零点为基准点,一纵轴为对称轴反折,向量的反折可以利用MATLAB的fliplr函数实现。
三、实验代码、实验结果及必要分析
(1) <1>
>> t=-5:0.01:10;
>> x=(1-exp(-0.5*t)).*(heaviside(t)); >> plot(t,x); >> xlabel('t'); >> title('x(t)');
<2>
>> t=-1:0.01:3;
>> x=cos(pi*t).*(heaviside(t)-heaviside(t-2)); >> plot(t,x); >> xlabel('t'); >> title('x(t)');
<3>
>> t=-5:0.01:5;
>> x=1/2*abs(t).*cos(pi*t).*(heaviside(t+2)-heaviside(t-2)); >> plot(t,x); >> xlabel('t'); >> title('x(t)');
<4>
>> t=-5:0.01:5;
>> x=exp(-t).*sin(2*pi*t).*(heaviside(t)-heaviside(t-3)); >> plot(t,x); >> xlabel('t'); >> title('x(t)'); >> grid on;
分析:使用MATLAB的plot功能可以绘制连续时间信号的波形
(2) <1>
>> n=-1:6;
>> x=heaviside(n-3); >> stem(n,x,'filled'); >> grid on; >> xlable('n'); >> xlabel('n'); >> title('x(n)');
相关推荐: