《基于-MATLAB的信号和系统实验指导》编程练习

2020-04-21 07:44

2连续时间信号在MATLAB中的表示

2-1.利用MATLAB命令画出下列连续信号的波形图

(1)

>> t=0:0.01:3;

>> ft=2*cos(3*t+pi/4); >> plot(t,ft),grid on; >> axis([0 3 -2.2 2.2]); >> title('2cos(3t+pi/4)')

(2)

>> t=0:0.01:3; >> ft=2-exp(-t); >> plot(t,ft),grid on; >> title('(2-exp(-t))u(t)')

(3)

>> t=-1:0.01:1;

>> ft=t.*(uCT(t)-uCT(t-1)); >> plot(t,ft),grid on >> axis([-1 1 -0.2 1.2]); >> title('t[u(t)-u(t-1)]')

(4)

>> t=-1:0.01:3;

>> ft=(1+cos(pi*t)).*(uCT(t)-uCT(t-2)); >> plot(t,ft),grid on >> axis([-1 3 -0.2 2.2]);

>> title('[1+cos(pi*t)][u(t)-u(t-2)]')

2-2.利用MATLAB命令画出下列复信号的实部、虚部、模和辐角

(1)

>> t=0:0.01:3;

>> ft=2+exp(i*(pi/4)*t)+exp(i*(pi/2)*t);

>> subplot(2,2,1);plot(t,real(ft));title('实部');axis([0 3 0 4]);grid on; >> subplot(2,2,2);plot(t,imag(ft));title('虚部');axis([0 3 0 2]);grid on; >> subplot(2,2,3);plot(t,abs(ft));title('模');axis([0 3 0 4]);grid on; >> subplot(2,2,4);plot(t,angle(ft));title('相角');axis([0 3 0 2]);grid on;

(2) t=0:0.01:3;

>> ft=2*exp(i*(t+pi/4));

>> subplot(2,2,1);plot(t,real(ft));title('实部');axis([0 3 0 2]);grid on; >> subplot(2,2,2);plot(t,imag(ft));title('虚部');axis([0 3 0 2]);grid on; >> subplot(2,2,3);plot(t,abs(ft));title('模');axis([0 3 0 4]);grid on; >> subplot(2,2,4);plot(t,angle(ft));title('相角');axis([0 3 0 4]);grid on;

2-3.利用MATLAB命令产生幅度为1、周期为1、占空比为0.5的一个周期矩形脉冲信号

>> t=-0.5:0.01:3;

>> ft=square(2*pi*t,50);

>> plot(t,ft);grid on;axis([-0.5 3 -1.2 1.2]);

>> title('幅度为1、周期为1、占空比0.5的周期举行脉冲信号')

3连续时间信号在MATLAB中的运算

3-1.试用MATLAB命令绘出以下信号的波形图

(1)

>> syms x t; >> t=-1:0.01:1;

>> x=exp(-t).*sin(10*pi*t)+exp(-0.5*t).*sin(9*pi*t); >> plot(t,x)

(2)

>> syms x t; >> t=-1:0.01:1;

>> x=sinc(t).*cos(10*pi*t); >> plot(t,x)


《基于-MATLAB的信号和系统实验指导》编程练习.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:塑料模模拟试卷 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: