X(t)的时域信号symsx;f=sym('cos(2/3*pi*x)');ezplot(f,[0,40]);0510152025303540-1-0.500.51xcos(2/3x)采样信号及频域波形w=-pi:0.01*pi:pi;n=0:40;x=cos(2/3*pi*n);X=x*exp(-j*n'*w);subplot(211);stem(n,x,'filled');xlabel('n');title('x[n]');subplot(212);plot(w/pi,X);0510152025303540-1-0.500.51nx[n]-1-0.8-0.6-0.4-0.200.20.40.60.81-50510152025过采样:w=-pi:0.01*pi:pi;n=0:40;x=cos(2/3*pi*n);X=x*exp(-j*n'*w);subplot(311);stem(n,x,'filled');xlabel('n');title('x[n]');subplot(312);plot(w/pi,abs(X));xlabel('\Omega/\pi');title('MagnitudeofX');subplot(313);plot(w/pi,angle(X));xlabel('\Omega/\pi');title('PhaseofX');0510152025303540-101nx[n]-1-0.8-0.6-0.4-0.200.20.40.60.8102040/MagnitudeofX-1-0.8-0.6-0.4-0.200.20.40.60.81-505/PhaseofX临界采样:w=-pi:0.01*pi:pi;n=0:1.5:40;x=cos(2/3*pi*n);X=x*exp(-j*n'*w);subplot(311);stem(n,x,'filled');xlabel('n');title('x[n]');subplot(312);plot(w/pi,abs(X));xlabel('\Omega/\pi');title('MagnitudeofX');subplot(313);plot(w/pi,angle(X));xlabel('\Omega/\pi');title('PhaseofX');0510152025303540-101nx[n]-1-0.8-0.6-0.4-0.200.20.40.60.8102040/MagnitudeofX-1-0.8-0.6-0.4-0.200.20.40.60.81-505/PhaseofX欠采样:w=-pi:0.01*pi:pi;n=0:3:40;x=cos(2/3*pi*n);X=x*exp(-j*n'*w);subplot(311);stem(n,x,'filled');xlabel('n');title('x[n]');subplot(312);plot(w/pi,abs(X));xlabel('\Omega/\pi');title('MagnitudeofX');subplot(313);plot(w/pi,angle(X));xlabel('\Omega/\pi');title('PhaseofX');051015202530354000.51nx[n]-1-0.8-0.6-0.4-0.200.20.40.60.8101020/MagnitudeofX-1-0.8-0.6-0.4-0.200.20.40.60.81-505/PhaseofX第二题临界采样n=-100:100;t=-30:0.005:30;wc=2;Ts=pi/wc;ws=2*pi/Ts;m=n*Ts;f=sinc(m/pi);ft=f*Ts*wc*sinc((wc/pi)*(ones(length(m),1)*t-m'*ones(1,length(t))))./pi;t1=-9*pi:Ts:9*pi;f1=sinc(t1/pi);subplot(311);stem(t1,f1,'filled');xlabel('kTs');ylabel('kTs');title('临界采样信号');subplot(312);plot(t,ft);title('临界采样信号重构信号');xlabel('t');ylabel('f(t)');subplot(313);plot(t,ft-sinc(t/pi));title('重构信号与原信号误差');xlabel('t');-30-20-100102030-101kTskTs临界采样信号-30-20-100102030-101临界采样信号重构信号tf(t)-30-20-100102030-505x10-6重构信号与原信号误差t欠采样n=-100:100;t=-30:0.005:30;wc=0.5;Ts=pi/wc;ws=2*pi/Ts;m=n*Ts;f=sinc(m/pi);ft=f*Ts*wc*sinc((wc/pi)*(ones(length(m),1)*t-m'*ones(1,length(t))))./pi;t1=-9*pi:Ts:9*pi;f1=sinc(t1/pi);subplot(311);stem(t1,f1,'filled');xlabel('kTs');ylabel('kTs');title('欠采样信号');subplot(312);plot(t,ft);xlabel('t');ylabel('f(t)');title('欠采样信号重构信号');subplot(313);plot(t,ft-sinc(t/pi));title('重构信号与原信号误差');xlabel('t');-30-20-100102030024x10-17kTskTs过采样信号-30-20-100102030-101tf(t)过采样信号重构信号-30-20-100102030-101重构信号与原信号误差t过采样n=-100:100;t=-30:0.005:30;wc=4;Ts=pi/wc;ws=2*pi/Ts;m=n*Ts;f=sinc(m/pi);ft=f*Ts*wc*sinc((wc/pi)*(ones(length(m),1)*t-m'*ones(1,length(t))))./pi;t1=-9*pi:Ts:9*pi;f1=sinc(t1/pi);subplot(311);stem(t1,f1,'filled');xlabel('kTs');ylabel('kTs');title('过采样信号');subplot(312);plot(t,ft);xlabel('t');ylabel('f(t)');title('过采样信号重构信号');subplot(313);plot(t,ft-sinc(t/pi));title('重构信号与原信号误差');xlabel('t');-30-20-100102030-101kTskTs过采样信号-30-20-100102030-101tf(t)过采样信号重构信号-30-20-100102030-101x10-5重构信号与原信号误差t