writing two integer together into edit text.

2 views (last 30 days)
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.

Accepted Answer

Mischa Kim
Mischa Kim on 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).

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!