欢迎来到天天文库
浏览记录
ID:40598139
大小:68.50 KB
页数:7页
时间:2019-08-04
《信号与线性系统上机实验1》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、实验一信号的MATLAB表示三、实验内容、源程序及执行结果1、用MATLAB表示连续信号:Aeat>>A=2;t=0:0.001:20;a=1;f=A*exp(a*t);plot(t,f)Acos(w0t+φ)>>A=1;t=0:0.001:3;w0=2*pi;phi=pi/6;f=A*cos(w0*t+phi);plot(t,f)Asin(w0t+φ)>>A=1;t=0:0.001:3;w0=2*pi;phi=pi/6;f=A*sin(w0*t+phi);plot(t,f)2、用信号处理工具箱提供的函数表示抽样信号、矩形脉冲
2、信号及三角脉冲信号。y=sinc(t)>>t=-10:0.001:10;f=sinc(t);plot(t,f)y=rectpuls(t,width)>>t=-10:0.001:10;T=1;f=rectpuls(t-2*T,2*T);plot(t,f)y=tripuls(t,width,skew)>>t=-4:0.001:4;f=tripuls(t,2,0.5);plot(t,f)3、编写如图所示的MATLAB函数,并画出f(0.5t),f(2-0.5t)的图形f(t)>>t=-4:0.001:4;>>f=rectpuls(t
3、+0.5,1)+tripuls(t-0.5,1,-1)-rectpuls(t-1.5,1);plot(t,fun)f(0.5t)>>t=-4:0.001:8;>>f=rectpuls(0.5*t+0.5,1)+tripuls(0.5*t-0.5,1,-1)-rectpuls(0.5*t-1.5,1);>>plot(t,f)f(2-0.5t)>>t=-4:0.001:8;>>fun=rectpuls(2-0.5*t+0.5,1)+tripuls(2-0.5*t-0.5,1,-1)-rectpuls(2-0.5*t-1.5,1);
4、>>plot(t,fun)4、用MATLAB表示离散信号ak>>k=0:5;a=0.6;f=a.^k;stem(k,f)Asin(k)>>k=0:50;A=2;f=A*sin(k);stem(k,f)
此文档下载收益归作者所有