Azzera filtri
Azzera filtri

How to display a value number in the figure

11 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Titus Edelhofer
Titus Edelhofer il 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

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by