Filter löschen
Filter löschen

How to display a value number in the figure

11 Ansichten (letzte 30 Tage)
Claire Redfield
Claire Redfield am 19 Feb. 2013
Hello guys, I have made a GUI. I would like to link a function to one of the buttons so that when clicking on it a picture will show the result(a variable x ).
Could you tell me how to do this thing similar to imshow(x), but x is a 1 by 1 number pls?

Akzeptierte Antwort

Titus Edelhofer
Titus Edelhofer am 19 Feb. 2013
Hi,
you can use a text uicontrol. So in GUIDE you add a text, and in the callback of your button you have something like
x = 42;
set(handles.text1, 'string', ['Result: ' num2str(x)]);
Titus

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps 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