FIR filter has output of same length as its input?
2 ビュー (過去 30 日間)
古いコメントを表示
If the input signal has length L samples, impulse repsonse has length M samples, entering these L samples to FIR filter using conv function, will get L+M-1 output samples, while entering these L samples to FIR fitler, the output has L samples only instead of L+M-1 samples . Also, I'd like to know which L samples does FIR filter choose from L+M-1 samples (total samples) to be its output ?.
0 件のコメント
採用された回答
Bruno Luong
2020 年 12 月 27 日
編集済み: Bruno Luong
2020 年 12 月 27 日
There is the the difference equation in the "Rational Transfer Function" part of the doc. x(i) with i<=0 are supposed to be 0.
and you can figure out easily just by experiment
>> x=rand(1,10)
x =
0.1576 0.9706 0.9572 0.4854 0.8003 0.1419 0.4218 0.9157 0.7922 0.9595
>> b=rand(1,3)
b =
0.9340 0.6787 0.7577
>> conv(x,b) % <= 'full' option
ans =
0.1472 1.0135 1.6722 1.8385 1.8022 1.0435 1.0966 1.2491 1.6810 2.1277 1.2515 0.7270
>> filter(b,1,x)
ans =
0.1472 1.0135 1.6722 1.8385 1.8022 1.0435 1.0966 1.2491 1.6810 2.1277
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!