Why does the DECIMATE function not use the specified filter order in MATLAB 6.5 (R13)?

1 次查看(过去 30 天)
I use the following syntax to specify a 7th order filter to be used in DECIMATE:
decimate(rand(1:100),31,7);
However, when I check the filter that is actually used by putting a breakpoint on line 140 of decimate.m, I see that nfilt (the filter order) is actually set to 6.

采纳的回答

MathWorks Support Team
This is the correct behavior. The MATLAB documentation and MATLAB file help does not alert the user to the possibility of DECIMATE not using the specified filter order.
In decimate.m on lines 126 to 132, the code lowers the filter order by evaluating the magnitude response of the filter at the cutoff frequency and comparing it to a threshold value of 1e-6. Depending on the type of CPU used (Pentium, Athlon, etc), the filter order may be reduced from the specified value.
Please see the related SWAT 1-2YWEQD on the reason for implementing the piece of code.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by