How to plot bode function in app designer?

Hi!
I have this problem:
I wrote this plot(app.UIAxes,bode(TF)); and works for step response and for rlocus but when I try to plot bode function it gives me this error: Error using plot, Data cannot have more than 2 dimensions.
I want to show the bode plot in the UIFigure not in other window.
Thanks in advance.

4 件のコメント

Mario Malic
Mario Malic 2020 年 8 月 25 日
編集済み: Mario Malic 2020 年 8 月 25 日
I haven't worked with bode plots,but I see it gives two plots.
You can try to save the output for each plot in variables and then plot it using
plot(app.UIAxes, xdata1, ydata1)
plot(app.UIAxes2, xdata2, ydata2) %this is second uiaxesplot
Victor Castro Campos
Victor Castro Campos 2020 年 8 月 25 日
Since TF is a transfer function, I think it is not possible to do that. Thanks.
Mario Malic
Mario Malic 2020 年 8 月 25 日
Here's an alternative answer for your question than.
https://www.mathworks.com/matlabcentral/answers/493099-how-can-i-convert-a-figure-into-a-uifigure#answer_403272
Victor Castro Campos
Victor Castro Campos 2020 年 8 月 26 日
Thank you for your help.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with Control System Toolbox についてさらに検索

タグ

質問済み:

2020 年 8 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by