How to export fdatool results in a *.m file?

2 views (last 30 days)
I want to use fdatool to design a lot FIR filters,is there any way to use fdatool in a m file and export the disigning result automatically? Thank you.

Accepted Answer

Star Strider
Star Strider on 2 Dec 2015
Edited: Star Strider on 2 Dec 2015
It looks as though fdatool is GUI only. (I don’t use it often.) Exporting the filter it designs appears to be straightforward. See the documentation for Using FDATool for details.
There are a number of fir filter design functions that you can use in your .m-files. The firls function may come closest do doing what you want. Explore them to see which works best for you.
  2 Comments
cai Qi
cai Qi on 3 Dec 2015
Edited: cai Qi on 3 Dec 2015
thank you
I found another way to export the result.
h = fdatool; hFv=fvtool(h.filter);
According to the documentation the fvtool return a figure handle but I can't save the figure using savefig. But savefig(gcf,'f.fig') works.
Star Strider
Star Strider on 3 Dec 2015
My pleasure.
I wasn’t quite certain what you wanted. I know fdatool can export its filter designs, but I thought you wanted to do it programmatically, not using the GUI. I’m glad you got that sorted.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!