Why am I unable to embed FREQZ plot in a GUI in MATLAB 7.5 (R2007b)?

Illustration
Ottosaul - 2021-03-13T14:06:21+00:00
Question: Why am I unable to embed FREQZ plot in a GUI in MATLAB 7.5 (R2007b)?

I have a filter design GUI where a user can input the poles and zeros of the desired response. I am using the FREQZ command to plot the frequency response of the filter in the GUI. However, the GUI gets destroyed by using FREQZ.  

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

The ability to pass an axes to FREQZ where the filter response can be plotted is not available in the  Signal Processing Toolbox (R2007b). While FVTOOL can be used to visualize filter response graphically, it cannot be embedded into a custom GUI.
 
When attempting to embed a FREQZ plot, it destroys the GUI because FREQZ uses the FREQZPLOT function to draw the magnitude and phase of the output response. When an input structure containing the axes to be  plotted is not passed to FREQZPLOT, it automatically generates two subplots in the current figure to plot magnitude and response, and thus destroys the GUI.
As a workaround, obtain the frequency response data from the FREQZ command, and plot this to the requisite axis.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!