int2strConverting an array of integers to a character array
int2str(A)A should be a numeric array.A to integers and then converts the integers to characters.A contains complex numbers, the imaginary parts are omitted.A is multi-dimensional, it is first reshaped to a matrix (i.e., 2D array) before the conversion.A is a character array, it is first converted to integers and then back to a character array.a=randi(10,3,3,3)
int2str(a)
a(:, :, 1) =
6.000 4.000 2.000
10.00 8.000 4.000
1.000 7.000 9.000
a(:, :, 2) =
6.000 5.000 3.000
9.000 8.000 5.000
6.000 5.000 1.000
a(:, :, 3) =
10.00 8.000 1.000
9.000 10.00 2.000
1.000 3.000 7.000
ans =
6 4 2 6 5 3 10 8 1
10 8 4 9 8 5 9 10 2
1 7 9 6 5 1 1 3 7