资源描述:
《matlab离散傅里叶变换实验报告》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、附页班级信工082学号16姓名刘刚实验组别实验日期室温报告日期成绩报告内容:(目的和要求,原理,步骤,数据,计算,小结等)实验三离散傅立叶变换(DFT)1.离散傅立叶级数给定有限长序列[1234],延拓为周期N=6的周期序列,并求其DFS。代码:N1=6;x1=[1234];N2=length(x2);n1=0:5*N2-1;x2=[x1,zeros(1,(6-length(x1)))];k=0:5*N2-1;x3=x2(mod(n1,N2)+1)Xk=x3*exp(-j*2*pi/N1).^(n1
2、'*k);subplot(321),stem(x1,'.');title('原序列')subplot(322),stem(x3,'.');title('原序列周期延拓')subplot(312),stem(Xk,'.');title('DFS')subplot(325),stem(abs(Xk),'.');title('DFS模值')subplot(326),stem(angle(Xk),'.');title('DFS相位')结果:第页附页2.求以下序列的N=16,32,64点的快速傅立叶变换x(n
3、)=exp(-i*pi/8*n);x2(n)=cos(pi/8*n);x3(n)=sin(pi/8*n)(1)代码:Fs=20;N1=16;n1=0:N1-1;xn1=exp(-i*pi/8*n1);D1=2*pi*Fs/N1;N2=32;n2=0:N2-1;xn2=exp(-i*pi/8*n2);D2=2*pi*Fs/N2;N3=64;n3=0:N3-1;xn3=exp(-i*pi/8*n3);D3=2*pi*Fs/N3;k1=floor(-(N1-1)/2:(N1-1)/2);k2=floor(
4、-(N2-1)/2:(N2-1)/2);k3=floor(-(N3-1)/2:(N3-1)/2);X1=fft(xn1,N1);X2=fft(xn2,N2);X3=fft(xn3,N3);subplot(3,4,1);stem(n1,xn1);title('原信号');ylabel('C=16')subplot(3,4,2);stem(X1,'.');title('FFT结果X');subplot(3,4,3);stem(k1*D1,abs(X1));title('X的模值');subplot(3,
5、4,4);plot(k1*D1,angle(X1));title('X的相位');subplot(3,4,5);stem(n2,xn2);ylabel('C=32')subplot(3,4,6);stem(X2,'.');subplot(3,4,7);stem(k2*D2,abs(X2));subplot(3,4,8);plot(k2*D2,angle(X2));subplot(3,4,9);stem(n3,xn3);ylabel('C=64')subplot(3,4,10);stem(X3,'.'
6、);subplot(3,4,11);stem(k3*D3,abs(X3));subplot(3,4,12);plot(k3*D3,angle(X3));结果:第页附页(2)代码:Fs=20;N1=16;n1=0:N1-1;xn1=cos(pi/8*n1);D1=2*pi*Fs/N1;N2=32;n2=0:N2-1;xn2=cos(pi/8*n2);D2=2*pi*Fs/N2;N3=64;n3=0:N3-1;xn3=cos(pi/8*n3);D3=2*pi*Fs/N3;k1=floor(-(N1-1)
7、/2:(N1-1)/2);k2=floor(-(N2-1)/2:(N2-1)/2);k3=floor(-(N3-1)/2:(N3-1)/2);X1=fft(xn1,N1);X2=fft(xn2,N2);X3=fft(xn3,N3);subplot(3,4,1);stem(xn1,'.');title('原信号');ylabel('C=16');axis([0,18,1.1*min(xn1),1.1*max(xn1)]);subplot(3,4,2);stem(X1,'.');title('FFT结果
8、X');subplot(3,4,3);stem(abs(X1),'.');title('X的模值');第页附页axis([0,18,1.1*min(abs(X1)),1.1*max(abs(X1))]);subplot(3,4,4);stem(angle(X1),'.');title('X的相位');axis([0,18,1.1*min(angle(X1)),1.1*max(angle(X1))]);subplot(3,4,5);stem(xn2,'.');ylabe