版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、南通大學DSP課程設計實驗加課后習題程序實驗一n=-50:50;u=(n>=0;e=(0.8.n;x1=e.*u;u1=(n>=4;u2=(n>=5;x2=(u1-u2;u3=(n>=0;u4=(n>=4;x2=(u3-u4;subplot(4,1,1;stem(n,u,'.'subplot(4,1,2;stem(n,x1,'.'subplot(4,1,3;stem(n,x2,'.'subplot(4,1,4;stem(n,x3,'.'實驗二n=-100:100;x1=(n>=-2&(n
2、<2;w=-2*pi:0.01:2*pi;X1=x1*exp(-j*n'*w;x=eps.m;x2=x1.*x;X2=x2*exp(-j*n'*w;x3=(n>=0&(n<4;X3=x3*exp(-j*n'*w;figure(1plot(w,abs(X1;figure(2plot(w,abs(X2;figure(3plot(w,abs(X3;實驗三N1=64;N2=64;N3=100;n1=0:N1-1;n2=0:N2-1;n3=0:N3-1;x1=(n1>=0&(n1<8;X1=fft(x1,N1;x21=a11+a21+
3、a31;x22=a12+a22+a32;X21=fft(x21,N1;X22=fft(x22,N2;x3=a4+a5+a6;X3=fft(x3,N3N4=250;n4=0:N4-1;u1=(n4>=0;u2=(n4>=N4;x4=a7+a8+a9;y1=u1-u2;y2=hamming(N4;x41=x4.*y1;x42=x4.*y2'X41=fft(x41,N4;X42=fft(x42,N4;figure(1stem(n1,abs(X1,'.'figure(2subplot(2,1,1;stem(n1,abs(X21,'.'subplot(
4、2,1,2;stem(n2,abs(X22,'.'figure(3stem(n3,abs(X3,'.'figure(4subplot(2,1,1;stem(n4,abs(X41,'.'subplot(2,1,2;stem(n4,abs(X42,'.'subplot(2,1,1;stem(n,abs(X41,'.'subplot(2,1,2;stem(n,abs(X42,'.'實驗四dt=0.0005;t=-0.005:dt:0.005;xa=exp(-1000*abs(t;n=-500:500;w=
5、-3*pi:0.001:3*pi;Ts1=1/20000;Ts2=1/5000;Ts3=1/1000;x1=exp(-1000*abs(n*Ts1;x2=exp(-1000*abs(n*Ts2;x3=exp(-1000*abs(n*Ts3;X1=x1*exp(-j*n'*w;X2=x2*exp(-j*n'*w;X3=x3*exp(-j*n'*w;figure(1;plot(t,xa;figure(2subplot(3,1,1;stem(w,abs(X1subplot(3,1,2;stem(w,abs(X2subplot(3,1,3;stem(w,abs(X3實驗五A=1
6、,-3.1836,4.6223,-3.7795,1.8136,-0.48,0.0544;B=0.0004,0.0022,0.0056,0.0075,0.0056,0.0022,0.0004;figure(1;H,w=freqz(B,A;plot(w,abs(H,''figure(2;h=impz(B,A;stem(h,'.'figure(3;zplane(B,A;z=roots(Bp=roots(Ax=-4,-2,0,-4,-6,-4,-2,-6,-6,-4,-4,-6,-6,-2,6,12,8,0,-16,-38,-60,-84,-90,-66,-32,-4,
7、-2,-4,8,12,12,10,6,6,4,0,0,0,0,0,-2,-2,0,0,-2,-2,-2,-2,0;figure(4;y=filter(B,A,x;stem(yA=1,-3.1836,4.6223,-3.7795,1.8136,-0.48,0.0544;B=0.0004,0.0022,0.0056,0.0075,0.0056,0.0022,0.0004;figure(1;H,w=freqz(B,A;plot(w,abs(H,''figure(2;h=impz(B,A;stem(h,'.'figure(3;zplane(B,A;z=roots(Bp=
8、roots(Ax=-4,-2,0,-4,-6,-4,-2,-6,-6,-4,-4,-6,-6,-2,6,12,8,0,-16,-38,-60,-84,-90,-66,-32,-4,-2,-4,8,12,12,10,6,6,4,0,0,0,0,0,-2,-2,0,0,-2,-2,-2,-2,0;figure(4;y=filter(B,A,x;subplot(2,1,1;stem(xsubplot(2,1,2;stem(y實驗六Fs=5000;b,a=butter(3,pi/4*Fs,'s'c,d=impinvar(b,a,Fs;H,w=freqz(c,d;figure(1subp
9、lot(2,1,1plot(w/pi,abs(H;ylabel('³å»÷ÏìÓ¦²»±ä·¨'m,n=bilinear(b,a,Fs;M,w=freqz(m,n;subplot(2,1,2plot(w/pi,abs(M;ylabel('Ë«ÏßÐԱ任·¨'grid;wp=0.4*pi;ws=0.5*
10、pi;ap=3;as=20;N,wn=buttord(wp/pi,ws/pi,ap,as;b,a=butter(N,wn,'low'figure(2freqz(b,a;n=0:47;x=1+cos(pi*n/4+cos(2*pi*n/3;y=filter(b,a,x;figure(3subplot(2,1,1;plot(n,x;grid;subplot(2,1,2;plot(n,y;grid;ws=0.4*pi;wp=0.5*pi;ap=3;as=20;N,wn=buttord(wp/pi,ws/pi,ap,as;b,a=butter(N,wn,'high'fi
11、gure(4freqz(b,a;n=0:47;x=1+cos(pi*n/4+cos(2*pi*n/3;y=filter(b,a,x;figure(5subplot(2,1,1;plot(n,x;grid;subplot(2,1,2;plot(n,y;grid;wp=0.2*pi 0.48*pi;ws=0.1*pi 0.55*pi;ap=3;as=20;N,wn=buttord(wp./pi,ws./pi,ap,as;b,a=butter(N,wn,'bandpass'figure(6freqz(b,a;n=0:47;x=1+cos(pi*n/4+cos(2*pi*n/3;y=f
12、ilter(b,a,x;figure(7subplot(2,1,1;plot(n,x;grid;subplot(2,1,2;plot(n,y;grid;實驗七N=25;wn=0.6;b=fir1(N,wn,hamming(N+1;H,w=freqz(b,1;figure(1n=0:N;stem(b,'.'gridfigure(2plot(w/pi,20*log10(abs(H;gridb2=fir1(N,wn,boxcar(N+1;H2,w=freqz(b2,1;figure(3n=0:N;stem(b2,'.'gridfigure(4plot(w/pi,20*
13、log10(abs(H2;gridb3=fir1(N,wn,blackman(N+1;H3,w=freqz(b3,1;figure(5n=0:N;stem(b3,'.'gridfigure(6plot(w/pi,20*log10(abs(H3;gridN2=30;wn2=0.3 0.6;b4=fir1(N2,wn2,hamming(N2+1;H4,w=freqz(b4,1;figure(7n=0:N;stem(b4,'.'gridfigure(8plot(w/pi,20*log10(abs(H4;grid習題一n=-12:12;x=(n>=-2&(
14、n<2;x0=(2.nx1=x.*x0;subplot(3,1,1;stem(n,x1,'.'x01=(n>=-4&(n<4;x02=(n>-4&(n<=4;x2=x02-x01;subplot(3,1,2;stem(n,x2,'.'x3=cos(0.3*pi*n;subplot(3,1,3;stem(n,x3,'.'習題二n=-50:50;N1=16;n1=0:N1-1;N2=25;n2=0:N2-1;N3=32;n3=0:N3-1;N4=50;n4=0:N4-1;w=-2*pi:0.01:2*pi
15、;x01=(n>=0;x02=(n>=32;x0=x01-x02;figure(1X1=dtft(x1,n,w;subplot(2,1,1;plot(w,abs(X1;subplot(2,1,2;plot(w,angle(X1;figure(2X2=fft(x2,N1;subplot(2,1,1;stem(n1,abs(X2;subplot(2,1,2;stem(n1,angle(X2;figure(3X3=fft(x3,N2;subplot(2,1,1;stem(n2,abs(X3;subplot(2,1,2;stem(n2,angle(X3;figure(4X4=fft(x4,
16、N3;subplot(2,1,1;stem(n3,abs(X4;subplot(2,1,2;stem(n3,angle(X4;習題三dt=0.0005;t=-0.005:dt:0.005;x0=(exp(-1000*t.*cos(2*pi*t;n=-500:500;w=-3*pi:0.001:3*pi;Ts1=1/20000;Ts2=1/5000;Ts3=1/1000;x1=(exp(-1000*n*Ts1.*cos(2*pi*n*Ts1;x2=(exp(-1000*n*Ts2.*cos(2*pi*n*Ts2;x3=(exp(-1000*n*Ts3.*cos(2*pi*n*Ts3;X1=dtf
17、t(x1,n,w;X2=dtft(x2,n,w;X3=dtft(x3,n,w;figure(1;plot(t,x0;figure(2subplot(3,1,1;plot(w,abs(X1subplot(3,1,2;plot(w,abs(X2subplot(3,1,3;plot(w,abs(X3習題四A=1,-0.5;B=1,2;figure(1;zplane(B,A;z=roots(Bp=roots(Afigure(2;h=impz(B,A;stem(h,'.'figure(3;H,w=freqz(B,A;plot(w,abs(H,''figure(4;n=0:
18、19;x=(n>=0&(n<20;y=filter(B,A,x;subplot(2,1,1;stem(xsubplot(2,1,2;stem(y習題五wn=0.1*pi 0.2*pi;N=10;b,a=butter(N,wn,'bandpass'figure(1freqz(b,a;figure(2n=0:N;stem(b,'.'grid;習題六wp=0.1; ws=0.2;Rp=3;Rs=30;N,wn=buttord(wp,ws,Rp,Rs;b,a=butter(N,wn,'low'freqz(b,a;習題七Fs=1;fig
19、ure(1b,a=butter(2,pi/4*Fs,'s'c,d=impinvar(b,a,Fs;H,w=freqz(c,d;plot(w/pi,abs(H;ylabel('³å¼¤ÏìÓ¦²»±ä·¨'gridq,w=butter(2,pi/4*Fs,'s'q0,w0=lp2hp(q,w,pi/4*Fs'm,n=bilinear(q0,w0,Fs;H,w=freqz(m,n;figure(2plot(w/pi,abs(H;ylabel('Ë«ÏßÐԱ任·¨'grid習題八N=18;wn=0.4;b=fir1(N,wn,hamming(N+1;H,w=freqz(b,1;figure(1n=0:N;subplot(2,1
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- DB11T 1065-2014 城市基礎地理信息矢量數(shù)據(jù)要素分類與代碼
- 江蘇省鹽城市2024-2025學年高三上學期11月期中物理試題(無答案)
- 化妝品用香料產(chǎn)業(yè)深度調(diào)研及未來發(fā)展現(xiàn)狀趨勢
- 家禽料槽市場需求與消費特點分析
- 冷鏈餐飲供應鏈行業(yè)相關項目經(jīng)營管理報告
- 婦女腹帶產(chǎn)業(yè)深度調(diào)研及未來發(fā)展現(xiàn)狀趨勢
- 江蘇省南通市海門區(qū)東洲小學等2024-2025學年四年級上學期11月期中科學試題
- 包裝袋用紙產(chǎn)業(yè)規(guī)劃專項研究報告
- 傳送高功率電子束的波導管產(chǎn)業(yè)運行及前景預測報告
- 小學語文“搭石”說課稿
- 地理信息科學專業(yè)職業(yè)生涯規(guī)劃書
- 廚房衛(wèi)生教案-勞動課教學設計
- 鍍鋅板通風管工程施工方案
- 企業(yè)家案例分析課件
- 助產(chǎn)職業(yè)生涯規(guī)劃書
- 福建省泉州市德化縣2023-2024學年七年級上學期期中考試道德與法治試題
- 職業(yè)生涯規(guī)劃-醫(yī)生職業(yè)說明
- 信息資源目錄編制規(guī)范(用于個人參考學習版本)
- 互聯(lián)網(wǎng)的定義及發(fā)展歷程
- 馬克思主義基本原理智慧樹知到課后章節(jié)答案2023年下齊魯工業(yè)大學
- 學而思小學奧數(shù)知識體系
評論
0/150
提交評論