完整word版连续时间信号分析答案.docx
《完整word版连续时间信号分析答案.docx》由会员分享,可在线阅读,更多相关《完整word版连续时间信号分析答案.docx(10页珍藏版)》请在冰点文库上搜索。
![完整word版连续时间信号分析答案.docx](https://file1.bingdoc.com/fileroot1/2023-7/12/bfadbed5-2fad-4543-8457-9cbe8ec2c334/bfadbed5-2fad-4543-8457-9cbe8ec2c3341.gif)
完整word版连续时间信号分析答案
实验一连续时间信号分析
一、实验目的
(一)掌握使用Matlab表示连续时间信号
1、学会运用Matlab表示常用连续时间信号的方法
2、观察并熟悉常用信号的波形和特性
(二)掌握使用Matlab进行连续时间信号的相关运算
1、学会运用Matlab进行连续时间信号的时移、反褶和尺度变换
2、学会运用Matlab进行连续时间信号微分、积分运算
3、学会运用Matlab进行连续时间信号相加、相乘运算
4、学会运用Matlab进行连续时间信号卷积运算
二、实验条件
一台电脑、winXP系统、matlab7.0软件
三、实验内容
1、利用Matlab命令画出下列连续信号的波形图。
(1)
代码:
clearall;closeall;clc;
K=2;a=3;
t=0:
0.01:
3;
ft=K*cos(a*t+pi/4);
plot(t,ft),gridon
axis([-5,5,-2.2,2.2])
title('2cos(3t+4π)')
(2)
代码:
函数文件:
functionf=uCT(t)
f=(t>=0);
命令文件:
clearall;closeall;clc;
a=-1;
t=-5:
0.01:
5;
ft=(2-exp(a*t)).*uCT(t);
%y=2-exp(a*t);
%plot(t,y),gridon
plot(t,ft),gridon
axis([-3,3,-3,3]);
title('指数信号与阶跃信号的乘积')
(3)
代码:
函数文件:
functionf=uCT(t)
f=(t>=0);
代码文件:
clearall;closeall;clc;
t=-5:
0.01:
5;
ft=(uCT(t)-uCT(t-2)).*(1+cos(pi*t));
%(1+cos(pi*t))*
plot(t,ft),gridon
axis([-3,3,-3,3]);
title('余弦信号与阶跃信号的乘积')
2、利用Matlab命令画出复信号
的实部、虚部、模和辐角。
解:
图像:
代码:
clearall;closeall;clc;
a=1;
t=-10:
0.01:
10;
ft=a*exp(j*(t+pi/4));
r=real(ft);
im=imag(ft);
ab=abs(ft);
an=angle(ft);
plot(t,r,'r',t,im,'b',t,ab,'g',t,an,'m'),gridon
axis([-5,5,-5,5]);
title('f(t)=2exp(j*(t+π/4))')
3、已知信号的波形(课本P13例题1-1),画出
的波形图。
解:
代码:
clearall;closeall;clc;
t=-5:
0.01:
5;
y1=funct1(t-2);
y2=funct1(3*t);y3=funct1(-t);y4=funct1(-3*t-2);
subplot(2,2,1);plot(t,y1);
axis([-3,5,-1,2]);title('f1(t)'),gridon;
subplot(2,2,2);plot(t,y2);
axis([-3,5,-1,2]);title('f2(t)'),gridon;
subplot(2,2,3);plot(t,y3);
axis([-3,5,-1,2]);title('f3(t)'),gridon;
subplot(2,2,4);plot(t,y4);
axis([-3,5,-1,2]);title('f4(t)'),gridon;
4、使用微分命令求
关于变量x的一阶导数;使用积分命令计算不定积分
,定积分
。
解:
代码:
clearall;closeall;clc;
symsx;
y=x*sin(x)*log(x);
dy=diff(y,'x',1)
z=x^5-2*x*x+sqrt(x)/2;
lz=int(z,'x')
w=x*exp(x)/[(1+x)^2];
lw=int(w,'x',0,1)
dy=sin(x)*log(x)+x*cos(x)*log(x)+sin(x);
lz=1/6*x^6-2/3*x^3+1/3*x^(3/2)
lw=1/2*exp
(1)-1
运行结果:
dy=
sin(x)*log(x)+x*cos(x)*log(x)+sin(x)
lz=
1/6*x^6-2/3*x^3+1/3*x^(3/2)
lw=
1/2*exp
(1)-1
lz=
1/6*x^6-2/3*x^3+1/3*x^(3/2)
lw=
0.3591
5、已知
,使用命令画出两信号和及两信号乘积的波形图。
其中,
解:
代码:
clearall;closeall;clc;
t=-2:
0.01:
2;
y1=sin(2*pi*t);
y2=sin(16*pi*t);
y3=y1.*y2;
plot(t,y1,'r',t,y2,'b',t,y3,'g'),gridon
axis([-2,2,-2,2]);
xlabel('t'),ylabel('y')
6、用Matlab命令绘出下列信号的卷积积分
的时域波形图。
解:
代码:
clearall;closeall;clc;
t=-2:
0.01:
4;
dt=0.01;
f1=uCT(t)-uCT(t-2);
f2=uCT(t)+uCT(t-1)-uCT(t-2);
f=conv(f1,f2)*dt;
n=length(f);tt=(0:
n-1)*dt-2;
plot(tt,f),gridon
axis([-4,12,-2,6]);
title('f=f1(t)*f2(t)')
)
四、实验结论和讨论
试验结果如内容三各题,本次试验采用matlab进行图形输出,没有人为误差,系统误差是由matlab软件所决定的。
五、实验思考
本次试验又加深了我对,matlab的熟悉程度,自从上一学期学了之后一直就很少使用matlab,今天再次操作,使我对原来的操作又熟悉了一遍,也加深了我对信号的理解,因为matlab的输出很直观,更能加深我的印象,当然以前学的有些命令还是有被遗忘,这次的操作就是一次回忆,对以后熟悉使用matlab有很大的帮助。