(w2/pi,abs(X11),'r:')Рxlabel('w2/pi')Рtitle('X1(k)的幅度(N=16)') %X1(k)的幅度(N=16)Рsubplot(2,3,2)Рplot(w1/pi,abs(X2))Рhold onРstem(w1/pi,abs(X2),'r:')Рxlabel('w2/pi')Рtitle('X2(k)的幅度(N=8)') % X2(k)的幅度(N=8)Рsubplot(2,3,5)Рplot(w2/pi,abs(X22))Рhold onРstem(w2/pi,abs(X22),'r:')Рxlabel('w1/pi')Рtitle('X2(k)的幅度(16)') %X2(k)的幅度(16)Рsubplot(2,3,3)Рplot(w1/pi,abs(X3))Рhold onРstem(w1/pi,abs(X3),'r:')Рxlabel('w1/pi')Рtitle('X3(k)的幅度(N=8)') %X3(k)的幅度(N=8)Рsubplot(2,3,6)Рplot(w2/pi,abs(X33))Рhold onРstem(w2/pi,abs(X33),'r:')Рxlabel('w2/pi')Рtitle('X3(k)的幅度(N=16)') %X3(k)的幅度(N=16)Р源程序2:Рclc;clf;clear;Рn=0:20;РT=1/64; Рx4=cos(8*pi*n*T)+cos(16*pi*n*T)+cos(20*pi*n*T);Рsubplot(2,2,1),stem(n,x4)Рtitle('理想采样序列 fs=64Hz')Рk1=0:15;РN=length(k1);РX4=fft(x4,N);Рw1=2*pi/N*k1;Рsubplot(2,2,2)Рplot(w1/pi,abs(X4))Рhold on