Documentation Center

  • Trials
  • Product Updates

Data Type Conversion

Converting between numeric arrays, character arrays, cell arrays, structures, or tables

Functions

char Convert to character array (string)
int2str Convert integer to string
mat2str Convert matrix to string
num2str Convert number to string
str2double Convert string to double-precision value
str2num Convert string to number
native2unicode Convert numeric bytes to Unicode character representation
unicode2native Convert Unicode character representation to numeric bytes
base2dec Convert base N number string to decimal number
bin2dec Convert binary number string to decimal number
dec2base Convert decimal to base N number in string
dec2bin Convert decimal to binary number in string
dec2hex Convert decimal to hexadecimal number in string
hex2dec Convert hexadecimal number string to decimal number
hex2num Convert hexadecimal number string to double-precision number
num2hex Convert singles and doubles to IEEE hexadecimal strings
table2array Convert table to homogenous array
table2cell Convert table to cell array
table2struct Convert table to structure array
array2table Convert homogeneous array to table
cell2table Convert cell array to table
struct2table Convert structure array to table
cell2mat Convert cell array to numeric array
cell2struct Convert cell array to structure array
cellstr Create cell array of strings from character array
mat2cell Convert array to cell array with potentially different sized cells
num2cell Convert array to cell array with consistently sized cells
struct2cell Convert structure to cell array
Was this topic helpful?