I Have a value of bwarea, how can I get this value and show in edit text in my GUI?
1 回表示 (過去 30 日間)
古いコメントを表示
Marlon Damaceno
2017 年 11 月 12 日
コメント済み: Marlon Damaceno
2017 年 11 月 12 日
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!