发布时间 : 星期二 文章海南大学信号与系统实验报告更新完毕开始阅读a6189518c5da50e2524d7f50
display('Please input the value of sample period'); Ts=input('Ts=');; subplot(121); plot(t,y,'b:'); hold on; t2=0:Ts:40;
y2=sin(2/3*pi*t2); stem(t2,y2);
axis([0 6 -1.1 1.1]);
xlabel('t 单位:s','Fontsize',8); title('fs(t)'); hold off;
Y2=Ts*y2*exp(-j*t2'*w); Y2=1/Ts*abs(Y2); subplot(122); plot(w/pi,Y,'b');
xlabel('\\omega 位:pi'); title('Fs(j\\omega)'); hold on;
plot(w/pi,Y2,'r');
axis([-2.5,2.5,0,pi*10]); hold off; %end
情况:Ts=1s
Ts=2s
8-3 clear N=300; W=2*pi*10; k=-N:N; w=k*W/N t=0:0.01:40; y=sin(t)./t; subplot(311); plot(t,y);
xlabel('t单位:s','Fontsize',8);
title('连续时间信号f(t)');display('Please input the value of sample period'); Ts=input('Ts='); subplot(312); plot(t,y,'b:'); hold on;
t2=0.001:Ts:40; y2=sin(t2)./t2; stem(t2,y2);
axis([0 40 -1.1 1.1]);
xlabel('t 单位:s','Fontsize',8); title('fs(t)'); hold off;
Y2=Ts*y2*exp(-j*t2'*w); Y2=1/Ts*abs(Y2); subplot(313); plot(Y2,'r'); %end hold off; %end
0.7*pi
1.5*pi