What is the difference between "fdesign" and "fir" ?
1 view (last 30 days)
Show older comments
Could u please explain me about the difference between "fdesign" and "fir" for design digital filter?
0 Comments
Accepted Answer
Honglei Chen
on 22 Jul 2013
d = fdesign.response(spec)
defines a particular filter specification. Based on that specification, if you do
myFilter = design(d)
you will get a filter which you can used to filter a signal by invoking
y = filter(myFilter,x)
This approach allows you to choose among eligible design methods at the design stage.
On the other hand,
b = fir1(n,Wn,'ftype',window)
is specifically for designing an FIR filter using window method, so you have to know that you want to use that particular method before you design that filter. What you get is simply the filter coefficients for the resulting FIR filter and you can use that to filter the signal via
y = filter(b,1,x)
If you happen to choose to design an FIR filter using window method in the fdesign approach, then you should get equivalent filters.
HTH
0 Comments
More Answers (2)
See Also
Categories
Find more on Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!