MATLAB: How to export fdatool results in a *.m file
fdatool programming
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.
Best Answer
It looks as thoughfdatool is GUI only. (I don’t use it often.) Exporting the filter it designs appears to be straightforward. See the documentation forUsing FDATool for details.
There are a number of fir filter design functions that you can use in your.m-files. Thefirls function may come closest do doing what you want. Explore them to see which works best for you.
As a general rule, anti-aliasing filters are implemented in hardware (as analogue filters)before sampling. An aliased signal in your sampled signal will always be part of it.
My preference would be an elliptic IIR filter for efficiency. See the documentation for ellip for details. For best results, begin with ellipord, and get the [z,p,k] output from ellip, then use second-order-section representation for stability with zp2sos. Use that result with filtfilt to do the actual filtering.
Best Answer