《数字信号处理》Matlab实验_第1页
《数字信号处理》Matlab实验_第2页
《数字信号处理》Matlab实验_第3页
《数字信号处理》Matlab实验_第4页
《数字信号处理》Matlab实验_第5页
已阅读5页,还剩4页未读 继续免费阅读

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、数字信号处理Matlab实验 一离散信号的 FFT 分析 1.用Matlab编程上机练习。已知: N=25。这里Q=0.9+j0.3。可以推导出 , 首先根据这个式子计算X(k)的理论值,然后计算输入序列x(n)的32个值,再利用基2时间抽选的FFT算法,计算x(n)的DFT X(k),与X(k)的理论值比较(要求计算结果最少6位有效数字)。解:函数代码: function xn() format long q=0.9+0.3*i; wn=exp(-2*pi*i/32); xk=(1-q32)./(1-q*wn.0:31)xn=q.0:31 xk1=fft(xn,32) diff=xk-xk1

2、具体执行情况: function xn()format longq=0.9+0.3*i;wn=exp(-2*pi*i/32);xk=(1-q32)./(1-q*wn.0:31)xk = Columns 1 through 2 0.693972803195698 + 3.499715655993840i 2.792267857648369 + 8.050455721438597i Columns 3 through 4 9.402964607913189 - 9.135013555028673i 1.866445467462052 - 3.833832762635439i Columns 5 t

3、hrough 6 1.131822689478846 - 2.234157347130941i 0.904793922868299 - 1.534629307882413i Columns 7 through 8 0.799557206779214 - 1.139609357830753i 0.739605630813150 - 0.882314367550644i Columns 9 through 10 0.700861643199240 - 0.698565363198060i 0.673575789604202 - 0.558478478082158i Columns 11 throu

4、gh 12 0.653109437428513 - 0.446244996656357i 0.636991253015040 - 0.352689135211701i Columns 13 through 14 0.623788380776217 - 0.272085968296931i 0.612612873742441 - 0.200641851238978i Columns 15 through 16 0.602883340189454 - 0.135703205872800i 0.594200434347139 - 0.075313670713158i Columns 17 throu

5、gh 18 0.586277479436723 - 0.017949220626496i 0.578899608820263 + 0.037651723475093i Columns 19 through 20 0.571898466305671 + 0.092606953506914i 0.565135772013173 + 0.147983310049841i Columns 21 through 22 0.558492135768929 + 0.204880771267792i 0.551859131244066 + 0.264522208758452i Columns 23 throu

6、gh 24 0.545133643745847 + 0.328364940349017i 0.538214362209129 + 0.398257131749283i Columns 25 through 26 0.531001527230573 + 0.476677768575531i 0.523403723684219 + 0.567132338629562i Columns 27 through 28 0.515362483773298 + 0.674849986673143i 0.506925762334513 + 0.808101482252638i Columns 29 throu

7、gh 30 0.498467012317214 + 0.980906313951879i 0.491389377970933 + 1.219207441587793i Columns 31 through 32 0.490732201059483 + 1.577081955159802i 0.517353973624932 + 2.188832884536347i xn=q.0:31xn = Columns 1 through 2 1.000000000000000 0.900000000000000 + 0.300000000000000i Columns 3 through 4 0.720

8、000000000000 + 0.540000000000000i 0.486000000000000 + 0.702000000000000i Columns 5 through 6 0.226800000000000 + 0.777600000000000i -0.029160000000000 + 0.767880000000000i Columns 7 through 8 -0.256608000000000 + 0.682344000000000i -0.435650400000000 + 0.537127200000000i Columns 9 through 10 -0.5532

9、23520000000 + 0.352719360000000i -0.603716976000000 + 0.151480368000000i Columns 11 through 12 -0.588789388800000 - 0.044782761600000i -0.516475621440000 - 0.216941302080000i Columns 13 through 14 -0.399745668672000 - 0.350189858304000i -0.254714144313600 - 0.435094573075200i Columns 15 through 16 -

10、0.098714357959680 - 0.467999359061760i 0.051556885554816 - 0.450813730543488i Columns 17 through 18 0.181645316162381 - 0.390265291822695i 0.280560372092951 - 0.296745167791711i Columns 19 through 20 0.341527885221169 - 0.182902539384655i 0.362245858514449 - 0.062153919879838i Columns 21 through 22

11、0.344667448626955 + 0.052735229662480i 0.294380134865516 + 0.150861941284319i Columns 23 through 24 0.219683538993669 + 0.224089787615542i 0.130488248809639 + 0.267585870552088i Columns 25 through 26 0.037163662763049 + 0.279973758139771i -0.050544830955187 + 0.263125481154709i Columns 27 through 28

12、 -0.124427992206081 + 0.221649483752682i -0.178480038111278 + 0.162156137715589i Columns 29 through 30 -0.209278875614827 + 0.092396512510647i -0.216069941806538 + 0.020373198575134i Columns 31 through 32 -0.200574907198425 - 0.046485103824341i -0.166571885331280 - 0.102009065601434i xk1=fft(xn,32)x

13、k1 = Columns 1 through 2 0.693972803195698 + 3.499715655993839i 2.792267857648366 + 8.050455721438599i Columns 3 through 4 9.402964607913182 - 9.135013555028692i 1.866445467462051 - 3.833832762635439i Columns 5 through 6 1.131822689478845 - 2.234157347130942i 0.904793922868298 - 1.534629307882413i C

14、olumns 7 through 8 0.799557206779213 - 1.139609357830754i 0.739605630813150 - 0.882314367550645i Columns 9 through 10 0.700861643199240 - 0.698565363198060i 0.673575789604202 - 0.558478478082158i Columns 11 through 12 0.653109437428514 - 0.446244996656356i 0.636991253015040 - 0.352689135211701i Colu

15、mns 13 through 14 0.623788380776217 - 0.272085968296931i 0.612612873742441 - 0.200641851238977i Columns 15 through 16 0.602883340189454 - 0.135703205872800i 0.594200434347139 - 0.075313670713159i Columns 17 through 18 0.586277479436723 - 0.017949220626496i 0.578899608820263 + 0.037651723475093i Colu

16、mns 19 through 20 0.571898466305671 + 0.092606953506913i 0.565135772013172 + 0.147983310049840i Columns 21 through 22 0.558492135768929 + 0.204880771267792i 0.551859131244065 + 0.264522208758452i Columns 23 through 24 0.545133643745846 + 0.328364940349016i 0.538214362209129 + 0.398257131749283i Colu

17、mns 25 through 26 0.531001527230572 + 0.476677768575531i 0.523403723684219 + 0.567132338629563i Columns 27 through 28 0.515362483773297 + 0.674849986673144i 0.506925762334512 + 0.808101482252638i Columns 29 through 30 0.498467012317213 + 0.980906313951879i 0.491389377970932 + 1.219207441587793i Colu

18、mns 31 through 32 0.490732201059480 + 1.577081955159802i 0.517353973624928 + 2.188832884536347i diff=xk-xk1diff = 1.0e-013 * Columns 1 through 2 0.001110223024625 + 0.004440892098501i 0.031086244689504 - 0.017763568394003i Columns 3 through 4 0.071054273576010 + 0.195399252334028i 0.015543122344752

19、+ 0.008881784197001i Columns 5 through 6 0.013322676295502 + 0.004440892098501i 0.001110223024625 + 0.004440892098501i Columns 7 through 8 0.006661338147751 + 0.002220446049250i 0 + 0.003330669073875i Columns 9 through 10 0.006661338147751 - 0.001110223024625i 0.005551115123126 - 0.001110223024625i

20、Columns 11 through 12 -0.001110223024625 - 0.005551115123126i 0.001110223024625 + 0.003330669073875i Columns 13 through 14 -0.002220446049250 + 0.001665334536938i 0.003330669073875 - 0.001387778780781i Columns 15 through 16 0.003330669073875 - 0.000277555756156i 0 + 0.002914335439641i Columns 17 thr

21、ough 18 0.002220446049250 - 0.000173472347598i -0.001110223024625 - 0.004302114220422i Columns 19 through 20 0.001110223024625 + 0.002081668171172i 0.001110223024625 + 0.001942890293094i Columns 21 through 22 0.002220446049250 + 0.001110223024625i 0.002220446049250 + 0.000555111512313i Columns 23 th

22、rough 24 0.003330669073875 + 0.002775557561563i 0.003330669073875 - 0.000555111512313i Columns 25 through 26 0.004440892098501 -0.002220446049250 - 0.001110223024625i Columns 27 through 28 0.014432899320127 - 0.006661338147751i 0.008881784197001 - 0.002220446049250i Columns 29 through 30 0.009992007221626 0.013877787807814 - 0.002220446049250i Columns 31 through 32 0.02275957200481

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论