1、程序:持续信号Sa(t):t=-20:0.5:20;f=sinc(t/pi);plot(t,f);xlabel(t);ylabel(x(t);title(持续信号sa(t)=sinc(t/pi)波形); grid;Sa(t)频谱:t=-20:0.5:20;f=sinc(t/pi); N=1000;k=-N:N;w1=10;w=k*w1/N;F=f*exp(-j*t*w)*0.5; plot(w,F); xlabel(x);ylabel(x(w);title( sa(t)=sinc(t/pi)信号频谱图)Sa(t)临界抽样及重构:wm=1;wc=wm; Ts=pi/wm; ws=2*pi/Ts;
2、 n=-100:100; nTs=n*Ts f=sinc(nTs/pi); Dt=0.005;t=-20:Dt:20;fa=f*Ts*wc/pi*sinc(wc/pi)*(ones(length(nTs),1)*t-nTs*ones(1,length(t); t1=-20:0.5:20;f1=sinc(t1/pi);subplot(211);stem(t1,f1);xlabel(kTs);ylabel(f(kTs);title(sa(t)=sinc(t/pi)临界采样信号);subplot(212);plot(t,fa);xlabel(t);ylabel(fa(t);title(由sa(t)=
3、sinc(t/pi)临界采样信号重构sa(t);grid;Sa(t)过抽样及重构: wm=1; wc=1.1*wm; Ts=0.7*pi/wm; ws=2*pi/Ts; n=-100:100; nTs=n*Ts f=sinc(nTs/pi); Dt=0.005; t=-10:Dt:10; fa=f*Ts*wc/pi*sinc(wc/pi)*(ones(length(nTs),1)*t-nTs*ones(1,length(t); error=abs(fa-sinc(t/pi); t1=-10:0.5:10; f1=sinc(t1/pi); m=-20:20; N=41; Xw=abs(fft(f
4、,N); subplot(2,2,1); plot(m,Xw); axis(-20 20 1.1*min(Xw) 1.1*max(Xw); xlabel(w); ylabel(|Xw|); title(抽样后频谱波形图); subplot(2,2,2); stem(t1,f1); xlabel(kTs); ylabel(f(kTs); title(sa(t)=sinc(t/pi)采样信号); subplot(2,2,3); plot(t,fa) xlabel(t); ylabel(fa(t); title(由sa(t)过采样信号重构sa(t); grid; subplot(2,2,4); pl
5、ot(t,error); xlabel(t); ylabel(error(t); title(过采样信号与原信号误差)Sa(t)欠抽样及重构: wm=1; wc=wm; Ts=1.5*pi/wm; ws=2*pi/Ts; n=-100:100; nTs=n*Ts f=sinc(nTs/pi); Dt=0.005; t=-10:Dt:10;fa=f*Ts*wc/pi*sinc(wc/pi)*(ones(length(nTs),1)*t-nTs*ones(1,length(t); error=abs(fa-sinc(t/pi); t1=-10:0.5:10; f1=sinc(t1/pi); m=-
6、20:20; N=41; Xw=abs(fft(f,N); subplot(2,2,1); plot(m,Xw); axis(-20 20 min(Xw) max(Xw); xlabel(w); ylabel(|Xw|); title(抽样后频谱波形图); subplot(2,2,2); stem(t1,f1); xlabel(kTs); ylabel(f(kTs); title(sa(t)=sinc(t/pi)采样信号); subplot(2,2,3); plot(t,fa) xlabel(t); ylabel(fa(t); title(由sa(t)欠采样信号重构sa(t); grid; subplot(2,2,4); plot(t,error); xlabel(t); ylabel(error(t); title(欠采样信号与原信号误差)