MATLAB: Convert double matrix to string

double to stringmatrix

Hello,
I want to convert a double matrix to a matrix of individual cells with the number between parentheses. So I want to convert A into B.
A=
1 2 3
4 5 6
7 8 9
B=
'1' '2' '3'
'4' '5' '6'
'7' '8' '9'
Im quite new to matlab and not sure which function to use for this purpose.
Thanks in advance! Greetings Boudewijn

Best Answer

B=arrayfun(@num2str,A,'un',0)
Related Question