MATLAB Answers


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

Asked by sermet
on 19 Jul 2013

%I have a data which its class is char. I need to write this data into edit text in my GUI.


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 Comment

Jan Simon
on 19 Jul 2013

This is almost the same question as 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.


No products are associated with this question.

1 Answer

Answer by Evan
on 19 Jul 2013
 Accepted answer

Assuming you created your GUI using GUIDE:



on 19 Jul 2013

ok it works but why I cannot assign into empty edit without problem?

on 19 Jul 2013

As I said, edit box is used to put inputs and not for displaying values.

on 19 Jul 2013

ok thank you so much.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!