Hello everyone, I want to print numbers in the edit field, how can I do it?
PESQ=1;
set(handles.edit1,'string',num2str(PESQ));

댓글 수: 3

Voss
Voss 2022년 6월 2일
Does that code not do what you want?
hEd=uicontrol('Style','edit');
hEd.String=num2str(pi,3);
works as expected from command line so one would presume the above would work just fine assuming value of handles.edit1 is valid.
Using the dot notation to directly access the property is more easily coded than using set() unless setting more than one property at a time.
Rik
Rik 2022년 6월 3일
The only downside of the dot notation is if you want compatibility with very old releases of Matlab. But since you seem to be using GUIDE, that point is moot.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

질문:

2022년 6월 2일

댓글:

Rik
2022년 6월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by