writing two integer together into edit text.

1 Ansicht (letzte 30 Tage)
sermet
sermet am 10 Apr. 2014
Beantwortet: Mischa Kim am 10 Apr. 2014
a=1787;
b=4;
%I need to add b to the end of a, like this "17874". Then I need to write this number into edit text in GUI.

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 10 Apr. 2014
Use something like
c = sprintf('%d%d',a,b);
set(handles.edit_text, 'String', c);
where the UI control is called handles.edit_text (or whatever it's called in your GUI).

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by