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!!!

采纳的回答

Walter Roberson
Walter Roberson 2017-11-12
set(handles.text1, 'String', num2str(bwarea(a)) )
  3 个评论
Image Analyst
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 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by