MATLAB Answers

How to display rise time in edit box MATLAB Gui?

조회 수: 3(최근 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
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개)

Community Treasure Hunt

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

Start Hunting!

Translated by