How to display rise time in edit box MATLAB Gui?

4 ビュー (過去 30 日間)
Unkown
Unkown 2021 年 8 月 3 日
コメント済み: Unkown 2021 年 8 月 3 日
How can i display the rise time and settling time that is obtained from the graph into the edit box GUI?
  2 件のコメント
Rik
Rik 2021 年 8 月 3 日
Just as with anything else you do in your GUI: write a function that calculates what you need, then use the handles to the objects to set the String property.
Unkown
Unkown 2021 年 8 月 3 日
Yes. I have done some of the following codes but it does display.
%Rise Time
h = Stepinfo(syspi);
set(handles.setime,'String', num2str(h));

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

採用された回答

Rik
Rik 2021 年 8 月 3 日
The function you're using doesn't return a single numeric value, but a struct, as the documentation clearly explains. You need to convert the results to a char array.
%Rise Time
h = Stepinfo(syspi);
str=num2str(h.RiseTime);
set(handles.setime,'String', str);
By using that intermediary step you can more clearly see what is happening.
%alternatively:
str=sprintf('Rise time: %.1f, Settling time: %.1f',h.RiseTime,h.SettlingTime)
  1 件のコメント
Unkown
Unkown 2021 年 8 月 3 日
Thank so much. now i get it

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by