FIR filter has output of same length as its input?
6 次查看(过去 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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!