文档详情

北京邮电大学_dsp_matlab实验报告.doc

发布:2017-05-19约3.06万字共48页下载文档
文本预览下载声明
数字信号处理实验报告 1.实验代码和实验结果 第一题 代码 n=25; Q=0.9+0.3*j; w=exp(-2*j*pi/n); x=zeros(25,1); format long; %长整型科学计数 for k0=1:25 x(k0,1)=Q^(k0-1); end; for k1=1:25; X1(k1,1)=(1-Q^n)/(1-Q*w^(k1-1)); end; X1;09 X2=fft(x,32); subplot(3,1,1);stem(abs(X1),b.);axis([0,35,0,15]);title(n=25,formular);xlabel(n); subplot(3,1,2);stem(abs(X2),g.);axis([0,35,0,15]);title(n=32, FFT);xlabel(n); for(a=1:25) X3(a)=X1(a)-X2(a) end; subplot(3,1,3);stem(abs(X3),r.);title(difference);xlabel(n); 计算结果: ans = 9 X3 = Columns 1 through 3 -0.00000000000000 - 0.00000000000000i 5.81743945432433 - 0.94104032411414i -9.27298924575721 + 1.80656702412604i Columns 4 through 6 -1.05572857100353 + 0.00616556748340i 0.10968027422814 + 0.31211741167892i -0.13222735983174 + 0.65654530497025i Columns 7 through 9 -0.49111521053207 + 0.33016438166124i -0.30235525446393 - 0.10440162933988i 0.07148879428600 - 0.06646447329936i Columns 10 through 12 0.07807584422556 + 0.21093439890354i -0.16197486894898 + 0.20965429204847i -0.17609533497531 - 0.03451623906308i Columns 13 through 15 0.06024619997253 - 0.09227280949669i 0.15449452114073 + 0.10848764137081i -0.00643484128503 + 0.20866057520478i Columns 16 through 18 -0.09530703340387 + 0.05937735093275i 0.06899960067770 - 0.04311375704508i 0.22216662172466 + 0.11115732555289i Columns 19 through 21 0.13078968842502 + 0.28936075813074i 0.00128821158403 + 0.23644957022933i 0.11811078116571 + 0.13248850939284i Columns 22 through 24 0.34447374929153 + 0.29290723643392i 0.36375932648194 + 0.63252670446287i 0.26885443564279 + 0.85200604794148i Column 25 0.50109676321778 + 1.11176259398208i X3 = Columns 1 through 3 -0.00000000000000 - 0.00000000000000i 5.81743945432433 - 0.94104032411414i -9.27298924575721 + 1.80656702412604i Columns 4 through 6 -1.05572857100353 + 0.00616556748340i 0.10968027422814 + 0.31211741167892i -0.13222735983174 + 0.65654530497025i Columns 7 t
显示全部
相似文档