MATLAB Function Reference Previous page   Next Page

Data Types

Numeric

[ ] Array constructor
cast Cast variable to different data type
cat Concatenate arrays along specified dimension
class Create object or return class of object
find Find indices and values of nonzero array elements
intmax Largest possible value of specified integer type
intmin Smallest possible value of specified integer type
intwarning Control state of integer warnings
ipermute Inverse permute dimensions of multidimensional array
isa Determine if input is object of given class (e.g., numeric)
isequal Test arrays for equality
isequalwithequalnans Test arrays for equality, treating NaNs as equal
isnumeric Determine if input is numeric array
isreal Determine if all array elements are real numbers
isscalar Determine if input is scalar (1-by-1)
isvector Determine if input is vector (1-by-N or N-by-1)
permute Rearrange dimensions of multidimensional array
realmax Largest positive floating-point number
realmin Smallest positive floating-point number
reshape Reshape array
squeeze Remove singleton dimensions from array
zeros Create array of all zeros

Characters and Strings

Description of Strings in MATLAB
strings MATLAB string handling description
 
Creating and Manipulating Strings
blanks Create string of space characters
char Convert to character array (string)
cellstr Create cell array of strings from character array
datestr Convert date and time to string format
deblank Strip trailing blanks from end of string
lower Convert string to lowercase
native2unicode Convert numeric bytes to Unicode characters
sprintf Write formatted data to string
sscanf Read string under format control
strcat Concatenate strings horizontally
strjust Justify character array
strread Read formatted data from string
strrep Find and replace substring
strtrim Remove leading and trailing whitespace from string
strvcat Concatenate strings vertically
unicode2native Convert Unicode characters to numeric bytes
upper Convert string to uppercase
 
Comparing and Searching Strings
class Create object or return class of object
findstr Find string within another, longer string
isa Determine if input is object of given class (e.g., char)
iscellstr Determine if input is cell array of strings
ischar Determine if input is character array
isletter Detect elements that are alphabetic letters
isscalar Determine if input is scalar (1-by-1)
isspace Detect elements that are ASCII white spaces
isstrprop Determine content of each element of string
isvector Determine if input is vector (1-by-N or N-by-1)
regexp Match regular expression
regexpi Match regular expression, ignoring case
regexprep Replace string using regular expression
strcmp Compare strings
strcmpi Compare strings, ignoring case
strfind Find one string within another
strmatch Find possible matches for string
strncmp Compare first n characters of strings
strncmpi Compare first n characters of strings, ignoring case
strtok Return selected parts of string
 
Evaluating String Expressions
eval Execute string containing MATLAB expression
evalc Evaluate MATLAB expression with capture
evalin Execute MATLAB expression in specified workspace

Structures

cell2struct Convert cell array to structure array
class Create object or return class of object
deal Distribute inputs to outputs
fieldnames List field names of structure
getfield Get field of structure array
isa Determine if input is object of given class (e.g., struct)
isequal Test arrays for equality
isfield Determine if input is structure array field
isscalar Determine if input is scalar (1-by-1)
isstruct Determine if input is structure array
isvector Determine if input is vector (1-by-N or N-by-1)
orderfields Order fields of structure array
rmfield Remove fields from structure
setfield Set value of structure array field
struct Create structure array
struct2cell Convert structure to cell array

Cell Arrays

{ } Construct cell array
cell Construct cell array
cellfun Apply function to each element in cell array
cellstr Create cell array of strings from character array
cell2mat Convert cell array of matrices to single matrix
cell2struct Convert cell array to structure array
celldisp Display cell array contents
cellplot Graphically display structure of cell arrays
class Create object or return class of object
deal Distribute inputs to outputs
isa Determine if input is object of given class (e.g., cell)
iscell Determine if input is cell array
iscellstr Determine if input is cell array of strings
isequal Test arrays for equality
isscalar Determine if input is scalar (1-by-1)
isvector Determine if input is vector (1-by-N or N-by-1)
mat2cell Divide matrix into cell array of matrices
num2cell Convert numeric array to cell array
struct2cell Convert structure to cell array

Data Type Conversion

Numeric
cast Cast variable to different data type
double Convert to double-precision
int8 Convert to signed 8-bit integer
int16 Convert to signed 16-bit integer
int32 Convert to signed 32-bit integer
int64 Convert to signed 64-bit integer
single Convert to single-precision
uint8 Convert to unsigned 8-bit integer
uint16 Convert to unsigned 16-bit integer
uint32 Convert to unsigned 32-bit integer
uint64 Convert to unsigned 64-bit integer
 
String to Numeric
base2dec Convert base N number string to decimal number
bin2dec Convert binary number string to decimal number
cast Cast variable to different data type
hex2dec Convert hexadecimal number string to decimal number
hex2num Convert hexadecimal number string to double-precision number
str2double Convert string to double-precision number
str2num Convert string to number
 
Numeric to String
cast Cast variable to different type
char Convert to character array (string)
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
int2str Convert integer to string
mat2str Convert matrix to string
num2str Convert number to string
 
Other Conversions
cell2mat Convert cell array of matrices to single matrix
cell2struct Convert cell array to structure array
datestr Convert date and time to string format
func2str Construct function name string from function handle
logical Convert numeric values to logical
mat2cell Divide matrix into cell array of matrices
num2cell Convert numeric array to cell array
str2func Construct function handle from function name string
str2mat Form blank-padded character matrix from strings
struct2cell Convert structure to cell array

Determine Data Type

is* Detect state
isa Determine if input is object of given class
iscell Determine if input is cell array
iscellstr Determine if input is cell array of strings
ischar Determine if input is character array
isfield Determine if input is character array
isfloat Determine if input is floating-point array
isinteger Determine if input is integer array
isjava Determine if input is Java object
islogical Determine if input is logical array
isnumeric Determine if input is numeric array
isobject Determine if input is MATLAB OOPs object
isreal Determine if all array elements are real numbers
isstruct Determine if input is MATLAB structure array

Previous page  Programming and Data Types Arrays Next page

© 1994-2005 The MathWorks, Inc.