This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Convert integers to character array


str = int2str(N)


str = int2str(N) converts integers to a character array. The input N can be a single integer or a vector or matrix of integers. Noninteger inputs are rounded before conversion.


int2str(2+3) returns '5'.

One way to label a plot is

title(['case number ' int2str(n)])

For matrix or vector inputs, int2str returns a character array:


ans =

1  0  0
0  1  0
0  0  1

See Also

| | |

Introduced before R2006a

Was this topic helpful?