I Have a value of bwarea, how can I get this value and show in edit text in my GUI?
조회 수: 1 (최근 30일)
이전 댓글 표시
Example:
EDITOR: bwarea(a)
COMMAND WINDOW: ans = 10 % (I need to show this value in my edit text GUI)
anybody help me? thanks!!!
댓글 수: 0
채택된 답변
Walter Roberson
2017년 11월 12일
set(handles.text1, 'String', num2str(bwarea(a)) )
댓글 수: 3
Image Analyst
2017년 11월 12일
Or, if you have a recent version of MATLAB you can use OOP syntax:
area = bwarea(a);
handles.text1.String = sprintf('The area = %.1f pixels', area);
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!