欢迎来到天天文库
浏览记录
ID:58875684
大小:51.50 KB
页数:9页
时间:2020-09-21
《《数字信号处理》Matlab实验.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、..《数字信号处理》Matlab实验一.离散信号的FFT分析1.用Matlab编程上机练习。已知:N=2^5。这里Q=0.9+j0.3。可以推导出,首先根据这个式子计算X(k)的理论值,然后计算输入序列x(n)的32个值,再利用基2时间抽选的FFT算法,计算x(n)的DFTX(k),与X(k)的理论值比较(要求计算结果最少6位有效数字)。解:函数代码:>>functionxn()>>formatlong>>q=0.9+0.3*i;>>wn=exp(-2*pi*i/32);>>xk=(1-q^32)./(1-q*wn.^[0:31])>>xn=q.^[0:31]>>x
2、k1=fft(xn,32)>>diff=xk-xk1具体执行情况:>>functionxn()formatlongq=0.9+0.3*i;wn=exp(-2*pi*i/32);xk=(1-q^32)./(1-q*wn.^[0:31])xk=Columns1through20.5698+3.3840i2.8369+8.8597iColumns3through49.3189-9.8673i1.2052-3.5439iColumns5through61.8846-2.0941i0.8299-1.2413i.....Columns7through80.9214-1.0753
3、i0.3150-0.0644iColumns9through100.9240-0.8060i0.4202-0.2158iColumns11through120.8513-0.6357i0.5040-0.1701iColumns13through140.6217-0.6931i0.2441-0.8978iColumns15through160.9454-0.2800i0.7139-0.3158iColumns17through180.6723-0.6496i0.0263+0.5093iColumns19through200.5671+0.6914i0.3173+0.9
4、841iColumns21through220.8929+0.7792i0.4066+0.8452iColumns23through240.5847+0.9017i0.9129+0.9283iColumns25through260.0573+0.5531i0.4219+0.9562iColumns27through280.3298+0.3143i0.4513+0.2638i.....Columns29through300.7214+0.1879i0.0933+1.7793iColumns31through320.9483+1.9802i0.4932+2.6347i>
5、>xn=q.^[0:31]xn=Columns1through21.00000.0000+0.0000iColumns3through40.0000+0.0000i0.0000+0.0000iColumns5through60.0000+0.0000i-0.0000+0.0000iColumns7through8-0.0000+0.0000i-0.0000+0.0000iColumns9through10-0.0000+0.0000i-0.0000+0.0000iColumns11through12-0.0000-0.0000i-0.0000-0.0000iColu
6、mns13through14-0.2000-0.4000i-0.3600-0.5200iColumns15through16-0.9680-0.1760i0.4816-0.3488i.....Columns17through180.2381-0.2695i0.2951-0.1711iColumns19through200.1169-0.4655i0.4449-0.9838iColumns21through220.6955+0.2480i0.5516+0.4319iColumns23through240.3669+0.5542i0.9639+0.2088iColumn
7、s25through260.3049+0.9771i-0.5187+0.4709iColumns27through28-0.6081+0.2682i-0.1278+0.5589iColumns29through30-0.4827+0.0647i-0.6538+0.5134iColumns31through32-0.8425-0.4341i-0.1280-0.1434i>>xk1=fft(xn,32)xk1=Columns1through20.5698+3.3839i2.8366+8.8599iColumns3through49.3182-9.8692i1.205
此文档下载收益归作者所有