先看下fir1中的一段解釋
For filters with a gain other than zero at Fs/2, e.g., highpass
and bandstop filters, N must be even.Otherwise, N will be
incremented by one.In this case the window length should be
specified as N+2.
即高通、帶阻濾波器的階數(shù)應(yīng)該控制為奇數(shù),因?yàn)槿绻A數(shù)為偶數(shù),則在π點(diǎn)必有一零點(diǎn),這對于高通帶阻來說是不允許的,故取階數(shù)為奇數(shù),而你FIR1濾波器階數(shù)為M+1階,所以你的M必須為偶數(shù),所以可以將程序改為
clear all;
clc
wlp=0.2*pi;wls=0.35*pi;wus=0.65*pi;wup=0.8*pi;
B=wls-wlp;
M=ceil(12*pi/B);
M=M+mod(M,2);
wp=[(wls+wlp)/2/pi,(wus+wup)/2/pi];
hn=fir1(M,wp,'stop',blackman(M+1));
freqz(hn)
在設(shè)計(jì)FIR濾波器時(shí)遇到點(diǎn)問題,
在設(shè)計(jì)FIR濾波器時(shí)遇到點(diǎn)問題,
clear all;
wlp=0.2*pi;wls=0.35*pi;wus=0.65*pi;wup=0.8*pi;
B=wls-wlp;
M=ceil(12*pi/B)-1;
wp=[(wls+wlp)/2/pi,(wus+wup)/2/pi];
hn=fir1(M,wp,'stop',blackman(M+1));
運(yùn)行該程序會顯示如下錯(cuò)誤:
Error using ==> fir1 at 92
The window length must be the same as the filter length.
具體該怎么解決那?
運(yùn)行了還是一樣的!
Error using ==> fir1 at 92
The window length must be the same as the filter length.
Error in ==> ex723 at 6
hn=fir1(M,wp,'stop',blackman(M));
clear all;
wlp=0.2*pi;wls=0.35*pi;wus=0.65*pi;wup=0.8*pi;
B=wls-wlp;
M=ceil(12*pi/B)-1;
wp=[(wls+wlp)/2/pi,(wus+wup)/2/pi];
hn=fir1(M,wp,'stop',blackman(M+1));
運(yùn)行該程序會顯示如下錯(cuò)誤:
Error using ==> fir1 at 92
The window length must be the same as the filter length.
具體該怎么解決那?
運(yùn)行了還是一樣的!
Error using ==> fir1 at 92
The window length must be the same as the filter length.
Error in ==> ex723 at 6
hn=fir1(M,wp,'stop',blackman(M));
英語人氣:108 ℃時(shí)間:2020-07-02 12:36:40
優(yōu)質(zhì)解答
我來回答
類似推薦
- 關(guān)于電腦的來歷(作文)
- The cloud comes from the vapour.--------問句是什么?
- 一克拉是幾克
- 一個(gè)三角形和一個(gè)平行四邊形的高和面積分別相等.如果平行四邊形的底是3.6dm,那么三角形的底是( )dm.
- 寫反義詞:可憐——()
- 一個(gè)三角形,切一刀,拼成等腰梯形
- 六年級上冊數(shù)學(xué)判斷選擇題.
- 好句子加賞析 短一點(diǎn)的!答得好加33分哦!
- 四年級數(shù)學(xué)上冊期末測試
- 下列能夠穩(wěn)定遺傳的是( ?。?A.顯性性狀 B.隱性性狀 C.優(yōu)良性狀 D.變異的性狀
- 一件工作由甲乙兩人合作需要3天完成,已知甲、乙工作效率之比是2:3,這件工作如果又乙單獨(dú)完成需要幾天完成?
- 4x三次方+6x+32等于多少?
猜你喜歡
- 1若一個(gè)整數(shù)的平方根是2a-1和-a+2,則a= ,這個(gè)整數(shù)是
- 2一列火車從甲的開往乙地,當(dāng)火車超過甲乙兩地的中點(diǎn)75千米時(shí),未行的路程是已行路程的2/3,行了多少千米?
- 3設(shè)甲數(shù)為x,用代數(shù)式表示乙數(shù);(1)甲數(shù)的4倍比乙數(shù)多7;(2)甲數(shù)的2倍比乙數(shù)少9.
- 4alone lone lonely的區(qū)別?
- 5你現(xiàn)在感覺怎么樣?我感覺好多了.英文
- 6市實(shí)驗(yàn)中學(xué)學(xué)生步行到郊外旅行.高一(1)班學(xué)生組成前隊(duì),步行速度為4千米/時(shí),高一(2)班學(xué)生組成后隊(duì),速度為6千米/時(shí).前隊(duì)出發(fā)1小時(shí)后,后隊(duì)才出發(fā),同時(shí)后隊(duì)派一名聯(lián)絡(luò)員騎自
- 7為什么負(fù)載增大,相當(dāng)于負(fù)載電阻Rl減小
- 8the bridge ( )a big ship can go has been built.括號里填under which 還是under that?為什么?
- 9野百合的春天閱讀答案有題目
- 100,25*2,5/1/32的簡便方法
- 11八年級上冊英語作文關(guān)于運(yùn)動的
- 12一次函數(shù)圖像怎么畫