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.
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
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.
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Comments
Post a Comment