FUNCTION REFERENCE
int2str
Round numbers and convert them to text.
Round numbers and convert them to text.
Syntax
s = int2str(x)Rounds x to the nearest integer (halves away from zero) and formats it like num2str. A matrix gives one text row per matrix row. Character input is formatted as its character codes: int2str('ab') gives '97 98'.
Example
int2str(2.7) % '3'Differences from MATLAB: none known. Character input works too, for example int2str('ab') and int2str(['ab';'cd']).
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.