MATLAB: Am I unable to embed FREQZ plot in a GUI in MATLAB 7.5 (R2007b)

embedfrequencyfreqzfreqzplotguimagnitudephaseplotresponseSignal Processing Toolboxsubplot

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.

Best Answer

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.