Skip to content

Type Conversion

Built-in functions › Programming and data types › Type Conversion

17 functions in this category.

FunctionWhat it does
castConvert an array to a different element type.
cell2matConvert a cell array to a matrix.
cell2structConvert a cell array to a structure with named fields.
charCharacter with the given numeric code (Excel-compatible).
doubleConvert to double-precision floating-point.
int16Convert to signed 16-bit integer (range −32,768 to 32,767).
int32Convert to signed 32-bit integer.
int64Convert to signed 64-bit integer.
int8Convert to signed 8-bit integer (range −128 to 127).
mat2cellSplit a matrix into a cell array of sub-matrices.
num2strConvert a number to a string.
singleConvert to single-precision floating-point.
struct2cellConvert a structure to a cell array.
uint16Convert to unsigned 16-bit integer (range 0 to 65,535).
uint32Convert to unsigned 32-bit integer.
uint64Convert to unsigned 64-bit integer.
uint8Convert to unsigned 8-bit integer (range 0 to 255).