How can have the Filter Designer’s “Overlay Spectrum” feature

I like the Filter Designer’s “Overlay Spectrum” feature, but now I’d like to use the FDATool instead, and cannot figure out how to do the analogous thing in the FDATool.


The ability to overlay spectrums is not available in the FDATool in the Signal Processing Toolbox.

As a workaround, you can use the FDATool’s “User-defined Spectral Mask” feature to display the spectum. Here, the “mtlb” signal will be used as an example.

After you have a version of the filter designed (so it is showing the magnitude response):

1. In the SPTool, use File->Export… to export the “mtlbse” spectrum to the base workspace.

2. Execute the following in the command window:

pvals = mtlbse.P((mtlbse.f>=0) & (mtlbse.f<=mtlbse.Fs/2));fvals = mtlbse.f((mtlbse.f>=0) & (mtlbse.f<=mtlbse.Fs/2));freq = fvals/(mtlbse.Fs/2);mag = 20*log10(pvals);

Here, the variables “freq” and “mag” represent the spectrum, trimmed to the visible area and configured to have the default frequency and magnitude units.


Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.