I Have a value of bwarea, how can I get this value and show in edit text in my GUI?

1 Ansicht (letzte 30 Tage)
Example:
EDITOR: bwarea(a)
COMMAND WINDOW: ans = 10 % (I need to show this value in my edit text GUI)
anybody help me? thanks!!!

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Nov. 2017
set(handles.text1, 'String', num2str(bwarea(a)) )
  3 Kommentare
Image Analyst
Image Analyst am 12 Nov. 2017
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);
Marlon Damaceno
Marlon Damaceno am 12 Nov. 2017
Yes! I have the last version 2017b. It works too! Thank you Image Analyst!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by