MATLAB: How to add one digit to another digits

addingcalculationdigitformat

For example, I have a number b=5; and i need to add it by another digits, for example 1234 and get the answer 12345. Code may show like: set(handles.text1,'string',1234+b) An error is "1234+b" and i don't know how format it that one digit adds to another digits. Thanks in advance.

Best Answer

strcat('1234','5')
you can convert any number to string with num2str or other similar function
strcat('1234',num2str(5))
b=5;
strcat('1234',num2str(b))