How to use the measure command in filter design
2 views (last 30 days)
Show older comments
Hi!
I am trying to use the measure command to store the filter properties in a variable so that i can refer to it for comparison with other filters. Here is my code:
hd = dfilt.dffir(FVr_temp); % designs the filter for the given coefficients
m=measure(hd);
if(m.astop==as)
S_struct.term=1;
end
The m.astop is not working but I did see it being used in some code. I want to access the passband and stop frequencies and attenuations and compare them with given values. How can I do it?
Also if measure cannot be used, then what is the alternate method.
Thanks
0 Comments
Answers (2)
Honglei Chen
on 12 Sep 2013
You need to go through the fdesign interface so measure() can work. Otherwise, if you simply specify the filter coefficients, it does not know what the specification is and thus cannot perform the measurements. You can find this info and some examples in the following reference page
HTH
Saumya
on 14 Sep 2013
1 Comment
Honglei Chen
on 18 Sep 2013
compare it to what? If you know the spec, then you can just plug in the expected frequency and see if the response matches what it should be.
See Also
Categories
Find more on Filter Design in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!