How to assisgn char data into empty Edit Text in Matlab GUI ?

1 visualizzazione (ultimi 30 giorni)
%I have a data which its class is char. I need to write this data into edit text in my GUI.
tp=0.99954;
scale_ppm=(tp-1)*10^6 %ppm
scale=sprintf('scale %10.4f ppm \n',scale_ppm) %char
%I want to assign "scale" into edit text (tag is edit1) in my GUI. Which codes exactly I need to use?
thanks in advance.
  1 Commento
Jan
Jan il 19 Lug 2013
This is almost the same question as http://www.mathworks.com/matlabcentral/answers/82444-set-handles-function-for-char-data. Please do not post questions twice. If you need tiny changes, add the new information and mark them by an "[EDITED]" tag in the text.

Accedi per commentare.

Risposta accettata

Evan
Evan il 19 Lug 2013
Assuming you created your GUI using GUIDE:
set(handles.edit1,'String',scale)
  10 Commenti
nl2605
nl2605 il 19 Lug 2013
As I said, edit box is used to put inputs and not for displaying values.

Accedi per commentare.

Più risposte (0)

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by