MATLAB: Adding matrix values into a string

matrixstring

Hello,
I want to turn a matrix
a=[1 2 3 4 5 6 7 8 9] for say
into a string with the three first values of the array
b=123;
Any ideas how to do it?

Best Answer

a=[1 2 3 4 5 6 7 8 9] ;
str = char(a+'0')
str = '123456789'