How to display Bode plot in App designer without open a new 'figure' window?

I can only draw the bode plot with function bode(), and I hope to display the plot within the app.
I've tried to enter bode(num, den), but it will open an extra window to show the plot.

 Accepted Answer

I remember tracking this through a couple of years ago:
When you use bode() with no outputs, then a few levels down in calls, the code will always call figure() to create a new window to draw the bode plot in. The reason for this is that bode plots are not just graphs: they are interactive charts that need to be able to attach behaviors to the figure in order to be able to do the plotting that bode() thinks it should be able to do.
The work-around is to call bode() with output arguments, and draw the values yourself.

More Answers (0)

Products

Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!