how to use varibles in a static text gui
Afficher commentaires plus anciens
I want to use a static text box to display some info along with some variables , is there a way to do so ?
Thanks in advance.
Réponse acceptée
Plus de réponses (1)
Joseph Cheng
le 29 Avr 2015
Modifié(e) : Joseph Cheng
le 29 Avr 2015
you handle it just like an edit box by setting the handle parameter 'string' to a string. so converting the variable from a double to a string would work.
example
%code in a sample pushbutton
number = randi(10);
set(handles.text1,'string',['random generated number: ' num2str(number)])
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!