Question
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.
Expert Answer
John Williams
PhD Expert
Answered Aug 12, 2026
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.
3. Select View->User-defined Spectral Mask... in the FDATool
4. In the resulting dialog box,
a) check "Enable Mask" b) enter "freq" (without quotes) for the "Frequency Vector" c) enter "mag" (without quotes)for the "Magnitude Vector" d) press "Apply"
This should display the spectrum.
Note that if go back and modify the displayed spectrum, you will find "freq" and "mag" have been replaced by very long strings representing the vectors. You can place your cursor in these edit boxes and use SHIFT+HOME or SHIFT+END to select the entire contents, and then press DELETE to clear the edit box.
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related matlab Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →