MATLAB: Int8(3) vs int(3)

integerinteger types

When I try run int(3), or int('b') I get an error: Undefined function 'int' for input arguments of type 'char'.
But when I run int8(3) or int8('b') (or any other int type) I get the expected results. Why?

Best Answer

At least in Matlab 2015, the function "int" is related to filters (in the filtstates package) or integration (in the symbolic package) but not to casting data types.
The functions for converting data, including "int8" are described in
MATLAB > Language Fundamentals > Operators and Elementary Operations > Arithmetic > Integers
in the Matlab documentation.
Hope this helps.
Related Question