Вы находитесь на странице: 1из 101

MATLAB — Functions

 By Category
 Alphabetical List

Language Fundamentals
Entering Commands

ans Most recent answer


clc Clear Command Window
diary Log Command Window text to file
format Set Command Window output display format
home Send cursor home
iskeyword Determine whether input is MATLAB keyword
more Control paged output in Command Window

Matrices and Arrays

zeros Create array of all zeros


ones Create array of all ones
rand Uniformly distributed random numbers
true Logical 1 (true)
false Logical 0 (false)
eye Identity matrix
diag Create diagonal matrix or get diagonal elements of matrix
blkdiag Block diagonal matrix
cat Concatenate arrays
horzcat Concatenate arrays horizontally
vertcat Concatenate arrays vertically
repelem Repeat copies of array elements
repmat Repeat copies of array
linspace Generate linearly spaced vector
logspace Generate logarithmically spaced vector
freqspace Frequency spacing for frequency response
meshgrid 2-D and 3-D grids
ndgrid Rectangular grid in N-D space
length Length of largest array dimension
size Array size
ndims Number of array dimensions
numel Number of array elements
isscalar Determine whether input is scalar
issorted Determine if array is sorted
issortedrows Determine if matrix or table rows are sorted
isvector Determine whether input is vector
ismatrix Determine whether input is matrix
isrow Determine whether input is row vector
iscolumn Determine whether input is column vector
isempty Determine whether array is empty
sort Sort array elements
sortrows Sort rows of matrix or table
flip Flip order of elements
fliplr Flip array left to right
flipud Flip array up to down
rot90 Rotate array 90 degrees
transpose Transpose vector or matrix
ctranspose Complex conjugate transpose
permute Permute array dimensions
ipermute Inverse permute array dimensions
circshift Shift array circularly
shiftdim Shift array dimensions
reshape Reshape array
squeeze Remove dimensions of length 1
colon Vector creation, array subscripting, and for-loop iteration
end Terminate block of code or indicate last array index
ind2sub Convert linear indices to subscripts
sub2ind Convert subscripts to linear indices

Data Types

Numeric Types

double Double-precision arrays


single Single-precision arrays
int8 8-bit signed integer arrays
int16 16-bit signed integer arrays
int32 32-bit signed integer arrays
int64 64-bit signed integer arrays
uint8 8-bit unsigned integer arrays
uint16 16-bit unsigned integer arrays
uint32 32-bit unsigned integer arrays
uint64 64-bit unsigned integer arrays
cast Convert variable to different data type
typecast Convert data type without changing underlying data
isinteger Determine whether input is integer array
isfloat Determine if input is floating-point array
isnumeric Determine whether input is numeric array
isreal Determine whether array is real
isfinite Determine which array elements are finite
isinf Determine which array elements are infinite
isnan Determine which array elements are NaN
eps Floating-point relative accuracy
flintmax Largest consecutive integer in floating-point format
Inf Create array of all Inf values
intmax Largest value of specific integer type
intmin Smallest value of specified integer type
NaN Create array of all NaN values
realmax Largest positive floating-point number
realmin Smallest normalized floating-point number

Characters and Strings

string String array


strings Create string array with no characters
join Combine strings
char Character array
cellstr Convert to cell array of character vectors
blanks Create character array of blanks
newline Create newline character
compose Format data into multiple strings
sprintf Format data into string or character vector
strcat Concatenate strings horizontally
append Combine strings
convertCharsToStrings
Convert character arrays to string arrays, leaving other
arrays unaltered
convertStringsToChars
Convert string arrays to character arrays, leaving other
arrays unaltered
convertContainedStringsToChars Convert string arrays at any level of cell array or structure
double Double-precision arrays
str2double Convert strings to double precision values
num2str Convert numbers to character array
ischar Determine if input is character array
iscellstr Determine if input is cell array of character vectors
isstring Determine if input is string array
isStringScalar Determine if input is string array with one element
strlength Lengths of strings
isstrprop
Determine which characters in input strings are of
specified category
isletter Determine which characters are letters
isspace Determine which characters are space characters
contains Determine if pattern is in strings
matches Determine if pattern matches strings
count Count occurrences of pattern in strings
endsWith Determine if strings end with pattern
startsWith Determine if strings start with pattern
strfind Find strings within other strings
sscanf Read formatted data from strings
replace Find and replace one or more substrings
replaceBetween Replace substrings between start and end points
strrep Find and replace substrings
split Split strings at delimiters
splitlines Split strings at newline characters
strjoin Join strings in array
strsplit Split string or character vector at specified delimiter
strtok Selected parts of strings
erase Delete substrings within strings
eraseBetween Delete substrings between start and end points
extractAfter Extract substrings after specified positions
extractBefore Extract substrings before specified positions
extractBetween Extract substrings between start and end points
insertAfter Insert strings after specified substrings
insertBefore Insert strings before specified substrings
pad Add leading or trailing characters to strings
strip Remove leading and trailing characters from stringS
lower Convert strings to lowercase
upper Convert strings to uppercase
reverse Reverse order of characters in strings
deblank Remove trailing whitespace from ends of strings
strtrim Remove leading and trailing whitespace from strings
strjust Justify strings
strcmp Compare strings
strcmpi Compare strings (case insensitive)
strncmp Compare first n characters of strings (case sensitive)
strncmpi Compare first n characters of strings (case insensitive)
regexp Match regular expression (case sensitive)
regexpi Match regular expression (case insensitive)
regexprep Replace text using regular expression
regexptranslate Translate text into regular expression

Dates and Time

datetime Arrays that represent points in time


NaT Not-a-Time
years Duration in years
days Duration in days
hours Duration in hours
minutes Duration in minutes
seconds Duration in seconds
milliseconds Duration in milliseconds
duration Lengths of time in fixed-length units
calyears Calendar duration in years
calquarters Calendar duration in quarters
calmonths Calendar duration in months
calweeks Calendar duration in weeks
caldays Calendar duration in days
calendarDuration Lengths of time in variable-length calendar units
year Year number
quarter Quarter number
month Month number and name
week Week number
day Day number or name
hour Hour number
minute Minute number
second Second number
ymd Year, month, and day numbers of datetime
hms Hour, minute, and second numbers of datetime or duration
split Split calendar duration into numeric and duration units
time Convert time of calendar duration to duration
timeofday Elapsed time since midnight for datetimes
isdatetime Determine if input is datetime array
isduration Determine if input is duration array
iscalendarduration Determine if input is calendar duration array
isnat Determine NaT (Not-a-Time) elements
isdst Determine daylight saving time elements
isweekend Determine weekend elements
timezones List time zones
tzoffset Time zone offset from UTC
between Calendar math differences
caldiff Calendar math successive differences
dateshift Shift date or generate sequence of dates and time
isbetween Determine elements within date and time interval
datenum Convert date and time to serial date number
datevec Convert date and time to vector of components
exceltime Convert MATLAB datetime to Excel date number
juliandate Convert MATLAB datetime to Julian date
posixtime Convert MATLAB datetime to POSIX time
yyyymmdd Convert MATLAB datetime to YYYYMMDD numeric value
addtodate Modify date number by field
char Character array
string String array
datestr Convert date and time to string format
now Current date and time as serial date number
clock Current date and time as date vector
date Current date as character vector
calendar Calendar for specified month
eomday Last day of month
weekday Day of week
etime Time elapsed between date vectors

Categorical Arrays
categorical Array that contains values assigned to categories
iscategorical Determine whether input is categorical array
discretize Group data into bins or categories
categories Categories of categorical array
iscategory Test for categorical array categories
isordinal Determine whether input is ordinal categorical array
isprotected Determine whether categories of categorical array are protected
addcats Add categories to categorical array
mergecats Merge categories in categorical array
removecats Remove categories from categorical array
renamecats Rename categories in categorical array
reordercats Reorder categories in categorical array
setcats Set categories in categorical array
summary Print summary of table, timetable, or categorical array
countcats Count occurrences of categorical array elements by category
isundefined Find undefined elements in categorical array

Tables

table Table array with named variables that can contain different types
array2table Convert homogeneous array to table
cell2table Convert cell array to table
struct2table Convert structure array to table
table2array Convert table to homogeneous array
table2cell Convert table to cell array
table2struct Convert table to structure array
table2timetable Convert table to timetable
timetable2table Convert timetable to table
readtable Create table from file
writetable Write table to file
detectImportOptions Create import options based on file content
spreadsheetImportOptions Import options object for Spreadsheets
getvaropts Get variable import options
setvaropts Set variable import options
setvartype Set variable data types
preview Preview eight rows from file using import options
head Get top rows of table, timetable, or tall array
tail Get bottom rows of table, timetable, or tall array
summary Print summary of table, timetable, or categorical array
height Number of table rows
width Number of table variables
istable Determine whether input is table
stackedplot Stacked plot of several variables with common x-axis
sortrows Sort rows of matrix or table
unique Unique values in array
issortedrows Determine if matrix or table rows are sorted
topkrows Top rows in sorted order
addvars Add variables to table or timetable
movevars Move variables in table or timetable
removevars Delete variables from table or timetable
convertvars Convert table or timetable variables to specified data type
splitvars Split multicolumn variables in table or timetable
mergevars Combine table or timetable variables into multicolumn variable
vartype Subscript into table or timetable by variable type
rows2vars Reorient table or timetable so that rows become variables
stack Stack data from multiple variables into single variable
unstack Unstack data from single variable into multiple variables
inner2outer Invert nested table-in-table hierarchy in tables or timetables
addprop Add custom properties to table or timetable
rmprop Remove custom properties from table or timetable
join Combine two tables or timetables by rows using key variables
innerjoin Inner join between two tables or timetables
outerjoin Outer join between two tables or timetables
union Set union of two arrays
intersect Set intersection of two arrays
ismember Array elements that are members of set array
setdiff Set difference of two arrays
setxor Set exclusive OR of two arrays
ismissing Find missing values
standardizeMissing Insert standard missing values
rmmissing Remove missing entries
fillmissing Fill missing values
varfun Apply function to table or timetable variables
rowfun Apply function to table or timetable rows
findgroups Find groups and return group numbers
splitapply Split data into groups and apply function
groupsummary Group summary computations

Timetables

timetable
Timetable array with time-stamped rows and variables of different
types
table2timetable Convert table to timetable
array2timetable Convert homogeneous array to timetable
timetable2table Convert timetable to table
istimetable Determine if input is timetable
summary Print summary of table, timetable, or categorical array
readtimetable Create timetable from file
writetimetable Write timetable to file
detectImportOptions Create import options based on file content
spreadsheetImportOptions Import options object for Spreadsheets
getvaropts Get variable import options
setvaropts Set variable import options
setvartype Set variable data types
preview Preview eight rows from file using import options
head Get top rows of table, timetable, or tall array
tail Get bottom rows of table, timetable, or tall array
timerange Time range for timetable row subscripting
withtol Time tolerance for timetable row subscripting
vartype Subscript into table or timetable by variable type
unique Unique values in array
sortrows Sort rows of matrix or table
retime
Resample or aggregate data in timetable, and resolve duplicate or
irregular times
synchronize
Synchronize timetables to common time vector, and resample or
aggregate data from input timetables
lag Time-shift data in timetable
isregular Determine whether times in timetable are regular
ismissing Find missing values
standardizeMissing Insert standard missing values
rmmissing Remove missing entries
fillmissing Fill missing values
stackedplot Stacked plot of several variables with common x-axis

Structures
struct Structure array
fieldnames Field names of structure, or public fields of Java or Microsoft COM object
getfield Field of structure array
isfield Determine if input is structure array field
isstruct Determine if input is structure array
orderfields Order fields of structure array
rmfield Remove fields from structure
setfield Assign value to structure array field
arrayfun Apply function to each element of array
structfun Apply function to each field of scalar structure
table2struct Convert table to structure array
struct2table Convert structure array to table
cell2struct Convert cell array to structure array
struct2cell Convert structure to cell array

Cell Arrays

cell Cell array


cell2mat Convert cell array to ordinary array of the underlying data type
cell2struct Convert cell array to structure array
cell2table Convert cell array to table
celldisp Display cell array contents
cellfun Apply function to each cell in cell array
cellplot Graphically display structure of cell array
cellstr Convert to cell array of character vectors
iscell Determine if input is cell array
iscellstr Determine if input is cell array of character vectors
mat2cell Convert array to cell array whose cells contain subarrays
num2cell Convert array to cell array with consistently sized cells
strjoin Join strings in array
strsplit Split string or character vector at specified delimiter
struct2cell Convert structure to cell array
table2cell Convert table to cell array

Function Handles

feval Evaluate function


func2str Construct character vector from function handle
str2func Construct function handle from character vector
localfunctions Function handles to all local functions in MATLAB file
functions Information about function handle

Map Containers

containers.Map Object that maps values to unique keys


isKey Determine if Map object contains key
keys Return keys of Map object
remove Delete key-value pairs from Map object
values Return values of Map object

Time Series

Time Series Objects

timeseries Create timeseries object


addevent Add event to timeseries
addsample Add data sample to timeseries object
append Concatenate timeseries objects in time
delevent Remove event from timeseries
delsample Remove sample from timeseries object
detrend Subtract mean or best-fit line from timeseries object
filter Modify frequency content of timeseries objects
idealfilter timeseries ideal filter
plot Plot timeseries
resample Resample timeseries time vector
set Set timeseries properties
setabstime Set timeseries times as date character vectors
setinterpmethod Set default interpolation method for timeseries object
setuniformtime Modify uniform timeseries time vector
synchronize
Synchronize and resample two timeseries objects using common time
vector
get Query timeseries properties
getabstime Convert timeseries time vector to cell array
getdatasamples Access timeseries data samples
getdatasamplesize timeseries data sample size
getinterpmethod timeseries interpolation method
getqualitydesc timeseries data quality
getsamples Subset of timeseries
getsampleusingtime Subset of timeseries data
gettsafteratevent Create timeseries at or after event
gettsafterevent Create timeseries after event
gettsatevent Create timeseries at event
gettsbeforeatevent Create timeseries at or before event
gettsbeforeevent Create timeseries before event
gettsbetweenevents Create timeseries between events
iqr Interquartile range of timeseries data
max Maximum of timeseries data
mean Mean of timeseries data
median Median of timeseries data
min Minimum of timeseries data
std Standard deviation of timeseries data
sum Sum of timeseries data
var Variance of timeseries data

Time Series Collections

tscollection Create tscollection object


addsampletocollection Add sample to tscollection
addts Add timeseries to tscollection
delsamplefromcollection Delete sample from tscollection
horzcat Horizontally concatenate tscollection objects
removets Remove timeseries from tscollection
resample Resample tscollection time vector
set Set tscollection properties
setabstime Set tscollection times as date character vectors
settimeseriesnames Rename timeseries in tscollection
vertcat Vertically concatenate tscollection objects
get Query tscollection properties
getabstime Convert tscollection time vector to cell array
getsampleusingtime Subset of tscollection data
gettimeseriesnames Names of timeseries in tscollection
isempty Determine if tscollection is empty
length Length of tscollection time vector
size Size of tscollection

Time Series Events

tsdata.event Create tsdata.event object


findEvent Query tsdata.event by name
get Query tsdata.event properties
getTimeStr Query tsdata.event times
set Set tsdata.event properties

Data Type Identification

iscalendarduration Determine if input is calendar duration array


iscategorical Determine whether input is categorical array
iscell Determine if input is cell array
iscellstr Determine if input is cell array of character vectors
ischar Determine if input is character array
isdatetime Determine if input is datetime array
isduration Determine if input is duration array
isenum Determine if variable is enumeration
isfloat Determine if input is floating-point array
isgraphics True for valid graphics object handles
isinteger Determine whether input is integer array
isjava Determine if input is Java object
islogical Determine if input is logical array
isnumeric Determine whether input is numeric array
isobject Determine if input is MATLAB object
isreal Determine whether array is real
isstring Determine if input is string array
isstruct Determine if input is structure array
istable Determine whether input is table
istimetable Determine if input is timetable
is* Detect state
isa Determine if input has specified data type
class Class of object
validateattributes Check validity of array
whos List variables in workspace, with sizes and types

Data Type Conversion

char Character array


cellstr Convert to cell array of character vectors
int2str Convert integers to characters
mat2str Convert matrix to characters
num2str Convert numbers to character array
str2double Convert strings to double precision values
str2num Convert character array or string to numeric array
native2unicode Convert numeric bytes to Unicode character representation
unicode2native Convert Unicode character representation to numeric bytes
base2dec Convert text representing number in base N to decimal number
bin2dec Convert text representation of binary number to decimal number
dec2base Convert decimal number to character array representing base-N number
dec2bin Convert decimal number to character array representing binary number
dec2hex Convert decimal number to character array representing hexadecimal number
hex2dec Convert text representation of hexadecimal number to decimal number
hex2num Convert IEEE hexadecimal format to double-precision number
num2hex Convert single- and double-precision numbers to IEEE hexadecimal format
table2array Convert table to homogeneous 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 ordinary array of the underlying data type
cell2struct Convert cell array to structure array
mat2cell Convert array to cell array whose cells contain subarrays
num2cell Convert array to cell array with consistently sized cells
struct2cell Convert structure to cell array

Operators and Elementary Operations

Arithmetic Operations

plus Addition
sum Sum of array elements
cumsum Cumulative sum
movsum Moving sum
minus Subtraction
diff Differences and approximate derivatives
times Multiplication
mtimes Matrix multiplication
prod Product of array elements
cumprod Cumulative product
rdivide Right array division
ldivide Left array division
mrdivide Solve systems of linear equations xA = B for x
mldivide Solve systems of linear equations Ax = B for x
power Element-wise power
mpower Matrix power
uminus Unary minus
uplus Unary plus
mod Remainder after division (modulo operation)
rem Remainder after division
idivide Integer division with rounding option
ceil Round toward positive infinity
fix Round toward zero
floor Round toward negative infinity
round Round to nearest decimal or integer
bsxfun Apply element-wise operation to two arrays with implicit expansion enabled

Relational Operations

eq Determine equality
ne Determine inequality
isequal Determine array equality
isequaln Determine array equality, treating NaN values as equal

Logical Operations

Short-circuit &&, || Logical operations with short-circuiting


and Find logical AND
not Find logical NOT
or Find logical OR
xor Find logical exclusive-OR
all Determine if all array elements are nonzero or true
any Determine if any array elements are nonzero
false Logical 0 (false)
find Find indices and values of nonzero elements
islogical Determine if input is logical array
logical Convert numeric values to logicals
true Logical 1 (true)
Set Operations

intersect Set intersection of two arrays


ismember Array elements that are members of set array
setdiff Set difference of two arrays
setxor Set exclusive OR of two arrays
union Set union of two arrays
unique Unique values in array
ismembertol Members of set within tolerance
uniquetol Unique values within tolerance
join Combine two tables or timetables by rows using key variables
innerjoin Inner join between two tables or timetables
outerjoin Outer join between two tables or timetables

Bit-Wise Operations

bitand Bit-wise AND


bitor Bit-wise OR
bitxor Bit-wise XOR
bitcmp Bit-wise complement
bitget Get bit at specified position
bitset Set bit at specific location
bitshift Shift bits specified number of places
swapbytes Swap byte ordering

Loops and Conditional Statements

if, elseif, else Execute statements if condition is true


for for loop to repeat specified number of times
parfor Parallel for loop
switch, case, otherwise Execute one of several groups of statements
try, catch Execute statements and catch resulting errors
while while loop to repeat when condition is true
break Terminate execution of for or while loop
continue Pass control to next iteration of for or while loop
end Terminate block of code or indicate last array index
pause Stop MATLAB execution temporarily
return Return control to invoking script or function
Data Import and Analysis
Data Import and Export

Standard File Formats

Text Files

readtable Create table from file


writetable Write table to file
readtimetable Create timetable from file
writetimetable Write timetable to file
detectImportOptions Create import options based on file content
delimitedTextImportOptions Import options object for delimited text
fixedWidthImportOptions Import options object for fixed-width text files
getvaropts Get variable import options
setvaropts Set variable import options
setvartype Set variable data types
preview Preview eight rows from file using import options
readmatrix Read matrix from file
writematrix Write a matrix to a file
readcell Read cell array from file
writecell Write cell array to file
readvars Read variables from file
textscan Read formatted data from text file or string
type Display contents of file
fileread Read contents of file as text
tabularTextDatastore Datastore for tabular text files

Spreadsheets

readtable Create table from file


writetable Write table to file
readtimetable Create timetable from file
writetimetable Write timetable to file
sheetnames Get sheet names from spreadsheet file
detectImportOptions Create import options based on file content
spreadsheetImportOptions Import options object for Spreadsheets
getvaropts Get variable import options
setvaropts Set variable import options
setvartype Set variable data types
preview Preview eight rows from file using import options
readmatrix Read matrix from file
writematrix Write a matrix to a file
readcell Read cell array from file
writecell Write cell array to file
readvars Read variables from file
importdata Load data from file
spreadsheetDatastore Datastore for spreadsheet files

Images

im2java Convert image to Java image


imfinfo Information about graphics file
imread Read image from graphics file
imwrite Write image to graphics file
Tiff MATLAB Gateway to LibTIFF library routines

Scientific Data

NetCDF Files

nccreate Create variable in NetCDF file


ncdisp Display contents of NetCDF data source in Command Window
ncinfo Return information about NetCDF data source
ncread Read data from variable in NetCDF data source
ncreadatt Read attribute value from NetCDF data source
ncwrite Write data to NetCDF file
ncwriteatt Write attribute to NetCDF file
ncwriteschema Add NetCDF schema definitions to NetCDF file
netcdf.setChunkCache Set default chunk cache settings for NetCDF library
netcdf.getChunkCache Retrieve chunk cache settings for NetCDF library
netcdf.inqLibVers Return NetCDF library version information
netcdf.setDefaultFormat Change default netCDF file format
netcdf.abort Revert recent netCDF file definitions
netcdf.close Close netCDF file
netcdf.create Create new NetCDF dataset
netcdf.endDef End netCDF file define mode
netcdf.inq Return information about netCDF file
netcdf.inqFormat Determine format of NetCDF file
netcdf.inqGrps Retrieve array of child group IDs
netcdf.inqUnlimDims Return list of unlimited dimensions in group
netcdf.open Open NetCDF data source
netcdf.reDef Put open netCDF file into define mode
netcdf.setFill Set netCDF fill mode
netcdf.sync Synchronize netCDF file to disk
netcdf.defDim Create netCDF dimension
netcdf.inqDim Return netCDF dimension name and length
netcdf.inqDimID Return dimension ID
netcdf.renameDim Change name of netCDF dimension
netcdf.defGrp Create group in NetCDF file
netcdf.inqDimIDs Retrieve list of dimension identifiers in group
netcdf.inqGrpName Retrieve name of group
netcdf.inqGrpNameFull Complete pathname of group
netcdf.inqGrpParent Retrieve ID of parent group.
netcdf.inqNcid Return ID of named group
netcdf.inqVarIDs IDs of all variables in group
netcdf.defVarFill Define fill parameters for NetCDF variable
netcdf.inqVarDeflate Determine compression settings for NetCDF variable
netcdf.defVar Create NetCDF variable
netcdf.defVarChunking Define chunking behavior for NetCDF variable
netcdf.defVarDeflate Define compression parameters for NetCDF variable
netcdf.defVarFletcher32 Define checksum parameters for NetCDF variable
netcdf.getVar Read data from NetCDF variable
netcdf.inqVar Information about variable
netcdf.inqVarChunking Determine chunking settings for NetCDF variable
netcdf.inqVarFill Determine values of fill parameters for NetCDF variable
netcdf.inqVarFletcher32 Fletcher32 checksum setting for NetCDF variable
netcdf.inqVarID Return ID associated with variable name
netcdf.putVar Write data to netCDF variable
netcdf.renameVar Change name of netCDF variable
netcdf.copyAtt Copy attribute to new location
netcdf.delAtt Delete netCDF attribute
netcdf.getAtt Return netCDF attribute
netcdf.inqAtt Return information about netCDF attribute
netcdf.inqAttID Return ID of netCDF attribute
netcdf.inqAttName Return name of netCDF attribute
netcdf.putAtt Write netCDF attribute
netcdf.renameAtt Change name of attribute
netcdf.getConstant Return numeric value of named constant
netcdf.getConstantNames Return list of constants known to netCDF library

HDF5 Files

High-Level Functions
h5create Create HDF5 data set
h5disp Display contents of HDF5 file
h5info Return information about HDF5 file
h5read Read data from HDF5 data set
h5readatt Read attribute from HDF5 file
h5write Write to HDF5 data set
h5writeatt Write HDF5 attribute
Low-Level FunctionsLibrary (H5)
H5.close Close HDF5 library
H5.garbage_collect Free unused memory in HDF5 library
H5.get_libversion Version of HDF5 library
H5.open Open HDF5 library
H5.set_free_list_limits Set size limits on free lists
Attribute (H5A)
H5A.close Close specified attribute
H5A.create Create attribute
H5A.delete Delete attribute
H5A.get_info Information about attribute
H5A.get_name Attribute name
H5A.get_space Copy of attribute data space
H5A.get_type Copy of attribute data type
H5A.iterate Execute function for attributes attached to object
H5A.open Open attribute
H5A.open_by_idx Open attribute specified by index
H5A.open_by_name Open attribute specified by name
H5A.read Read attribute
H5A.write Write attribute
Dataset (H5D)
H5D.close Close dataset
H5D.create Create new dataset
H5D.get_access_plist Copy of dataset access property list
H5D.get_create_plist Copy of dataset creation property list
H5D.get_offset Location of dataset in file
H5D.get_space Copy of dataset data space
H5D.get_space_status Determine if space is allocated
H5D.get_storage_size Determine required storage size
H5D.get_type Copy of datatype
H5D.open Open specified dataset
H5D.read Read data from HDF5 dataset
H5D.set_extent Change size of dataset dimensions
H5D.vlen_get_buf_size Determine variable length storage requirements
H5D.write Write data to HDF5 dataset
Dimension Scale (H5DS)
H5DS.attach_scale Attach dimension scale to specific dataset dimension
H5DS.detach_scale Detach dimension scale from specific dataset dimension
H5DS.get_label Retrieve label from specific dataset dimension
H5DS.get_num_scales Number of scales attached to dataset dimension
H5DS.get_scale_name Name of dimension scale
H5DS.is_scale Determine if dataset is a dimension scale
H5DS.iterate_scales Iterate on scales attached to dataset dimension
H5DS.set_label Set label for dataset dimension
H5DS.set_scale Convert dataset to dimension scale
Error (H5E)
H5E.clear Clear error stack
H5E.get_major Description of major error number
H5E.get_minor Description of minor error number
H5E.walk Walk error stack
File (H5F)
H5F.close Close HDF5 file
H5F.create Create HDF5 file
H5F.flush Flush buffers to disk
H5F.get_access_plist File access property list
H5F.get_create_plist File creation property list
H5F.get_filesize Size of HDF5 file
H5F.get_freespace Amount of free space in file
H5F.get_info Global information about file
H5F.get_mdc_config Metadata cache configuration
H5F.get_mdc_hit_rate Metadata cache hit-rate
H5F.get_mdc_size Metadata cache size data
H5F.get_name Name of HDF5 file
H5F.get_obj_count Number of open objects in HDF5 file
H5F.get_obj_ids List of open HDF5 file objects
H5F.is_hdf5 Determine if file is HDF5
H5F.mount Mount HDF5 file onto specified location
H5F.open Open HDF5 file
H5F.reopen Reopen HDF5 file
H5F.set_mdc_config Configure HDF5 file metadata cache
H5F.unmount Unmount file or group from mount point
Group (H5G)
H5G.close Close group
H5G.create Create group
H5G.get_info Information about group
H5G.open Open specified group
Identifier (H5I)
H5I.dec_ref Decrement reference count
H5I.get_file_id File identifier for specified object
H5I.get_name Name of object
H5I.get_ref Reference count of object
H5I.get_type Type of object
H5I.inc_ref Increment reference count of specified object
H5I.is_valid Determine if specified identifier is valid
Link (H5L)
H5L.copy Copy link from source location to destination location
H5L.create_external Create soft link to external object
H5L.create_hard Create hard link
H5L.create_soft Create soft link
H5L.delete Remove link
H5L.exists Determine if link exists
H5L.get_info Information about link
H5L.get_name_by_idx Information about link specified by index
H5L.get_val Value of symbolic link
H5L.iterate Iterate over links
H5L.iterate_by_name Iterate through links in group specified by name
H5L.move Rename link
H5L.visit Recursively iterate through links in group specified by group identifier
H5L.visit_by_name
Recursively iterate through links in group specified by location and
group name
MATLAB (H5ML)
H5ML.compare_values Numerically compare two HDF5 values
H5ML.get_constant_names Constants known by HDF5 library
H5ML.get_constant_value Value corresponding to a string
H5ML.get_function_names Functions provided by HDF5 library
H5ML.get_mem_datatype Data type for dataset ID
Object (H5O)
H5O.close Close object
H5O.copy Copy object from source location to destination location
H5O.get_comment Get comment for object specified by object identifier
H5O.get_comment_by_name Get comment for object specified by location and object name
H5O.get_info Object metadata
H5O.link Create hard link to specified object
H5O.open Open specified object
H5O.open_by_idx Open object specified by index
H5O.set_comment Set comment for object specified by object identifier
H5O.set_comment_by_name Set comment for object specified by location and object name
H5O.visit Visit objects specified by object identifier
H5O.visit_by_name Visit objects specified by location and object name
Property (H5P)General Property List Operations
H5P.close Close property list
H5P.copy Copy of property list
H5P.create Create new property list
H5P.get_class Property list class
Generic Property List Operations
H5P.close_class Close property list class
H5P.equal Determine equality of property lists
H5P.exist Determine if specified property exists in property list
H5P.get Value of specified property in property list
H5P.get_class_name Name of property list class
H5P.get_class_parent Identifier for parent class
H5P.get_nprops Query number of properties in property list or class
H5P.get_size Query size of property value in bytes
H5P.isa_class Determine if property list is member of class
H5P.iterate Iterate over properties in property list
H5P.set Set property list value
Dataset Access, Memory, and Transfer Properties
H5P.get_btree_ratios B-tree split ratios
H5P.get_chunk_cache Raw data chunk cache parameters
H5P.get_edc_check Determine if error detection is enabled
H5P.get_hyper_vector_size Number of I/O vectors
H5P.set_btree_ratios Set B-tree split ratios for dataset transfer
H5P.set_chunk_cache Set raw data chunk cache parameters
H5P.set_edc_check Enable error detection for dataset transfer
H5P.set_hyper_vector_size Set number of I/O vectors for hyperslab I/O
Dataset Creation Properties
H5P.all_filters_avail Determine availability of all filters
H5P.fill_value_defined Determine if fill value is defined
H5P.get_alloc_time Return timing of storage space allocation
H5P.get_chunk Return size of chunks
H5P.get_external Return information about external file
H5P.get_external_count Return count of external files
H5P.get_fill_time Return time when fill values are written to dataset
H5P.get_fill_value Return dataset fill value
H5P.get_filter Return information about filter in pipeline
H5P.get_filter_by_id Return information about specified filter
H5P.get_layout Determine layout of raw data for dataset
H5P.get_nfilters Return number of filters in pipeline
H5P.modify_filter Modify filter in pipeline
H5P.remove_filter Remove filter from property list
H5P.set_alloc_time Set timing for storage space allocation
H5P.set_chunk Set chunk size
H5P.set_deflate Set compression method and compression level
H5P.set_external Add additional file to external file list
H5P.set_fill_time Set time when fill values are written to dataset
H5P.set_fill_value Set fill value for dataset creation property list
H5P.set_filter Add filter to filter pipeline
H5P.set_fletcher32 Set Fletcher32 checksum filter in dataset creation
H5P.set_layout Set type of storage for dataset
H5P.set_nbit Set N-Bit filter
H5P.set_scaleoffset Set Scale-Offset filter
H5P.set_shuffle Set shuffle filter
File Access Properties
H5P.get_alignment Retrieve alignment properties
H5P.get_driver Low-level file driver
H5P.get_family_offset Offset for family file driver
H5P.get_fapl_core Information about core file driver properties
H5P.get_fapl_family File access property list information
H5P.get_fapl_multi Information about multifile access property list
H5P.get_fclose_degree File close degree
H5P.get_libver_bounds Library version bounds settings
H5P.get_gc_references Garbage collection references setting
H5P.get_mdc_config Metadata cache configuration
H5P.get_meta_block_size Metadata block size setting
H5P.get_multi_type Type of data property for MULTI driver
H5P.get_sieve_buf_size Maximum data sieve buffer size
H5P.get_small_data_block_size Small data block size setting
H5P.set_alignment Set alignment properties for file access property list
H5P.set_family_offset Set offset property for family of files
H5P.set_fapl_core Modify file access to use H5FD_CORE driver
H5P.set_fapl_family Set file access to use family driver
H5P.set_fapl_log Set use of logging driver
H5P.set_fapl_multi Set use of multifile driver
H5P.set_fapl_sec2 Set file access for sec2 driver
H5P.set_fapl_split Set file access for emulation of split file driver
H5P.set_fapl_stdio Set file access for standard I/O driver
H5P.set_fclose_degree Set file access for file close degree
H5P.set_gc_references Set garbage collection references flag
H5P.set_libver_bounds Set library version bounds for objects
H5P.set_mdc_config Set initial metadata cache configuration
H5P.set_meta_block_size Set minimum metadata block size
H5P.set_multi_type Specify type of data accessed with MULTI driver
H5P.set_sieve_buf_size Set maximum size of data sieve buffer
H5P.set_small_data_block_size Set size of block reserved for small data
File Creation Properties
H5P.get_istore_k Return 1/2 rank of indexed storage B-tree
H5P.get_sizes Return size of offsets and lengths
H5P.get_sym_k Return size of B-tree 1/2 rank and leaf node 1/2 size
H5P.get_userblock Return size of user block
H5P.get_version Return version information for file creation property list
H5P.set_istore_k Set size of parameter for indexing chunked datasets
H5P.set_sizes Set byte size of offsets and lengths
H5P.set_sym_k Set size of parameters used to control symbol table nodes
H5P.set_userblock Set user block size
Object Copy and Object Creation Properties
H5P.get_attr_creation_order Return tracking order and indexing settings
H5P.get_attr_phase_change Retrieve attribute phase change thresholds
H5P.get_copy_object Return properties to be used when object is copied
H5P.set_attr_creation_order Set tracking of attribute creation order
H5P.set_attr_phase_change Set attribute storage phase change thresholds
H5P.set_copy_object Set properties to be used when objects are copied
Group Creation Properties
H5P.get_create_intermediate_group Determine creation of intermediate groups
H5P.get_link_creation_order Query if link creation order is tracked
H5P.get_link_phase_change Query settings for conversion between groups
H5P.set_create_intermediate_group Set creation of intermediate groups
H5P.set_link_creation_order Set creation order tracking and indexing
H5P.set_link_phase_change Set parameters for group conversion
HDF5 String Properties
H5P.get_char_encoding Return character encoding
H5P.set_char_encoding Set character encoding used to encode strings
Reference (H5R)
H5R.create Create reference
H5R.dereference Open object specified by reference
H5R.get_name Name of referenced object
H5R.get_obj_type Type of referenced object
H5R.get_region Copy of data space of specified region
Dataspace (H5S)
H5S.copy Create copy of data space
H5S.create Create new data space
H5S.close Close data space
H5S.create_simple Create new simple data space
H5S.extent_copy Copy extent from source to destination data space
H5S.is_simple Determine if data space is simple
H5S.offset_simple Set offset of simple data space
H5S.select_all Select entire extent of data space
H5S.select_elements Specify coordinates to include in selection
H5S.select_hyperslab Select hyperslab region
H5S.select_none Reset selection region to include no elements
H5S.select_valid Determine validity of selection
H5S.set_extent_none Remove extent from data space
H5S.set_extent_simple Set size of data space
H5S.get_select_bounds Bounding box of data space selection
H5S.get_select_elem_npoints Number of element points in selection
H5S.get_select_elem_pointlist Element points in data space selection
H5S.get_select_hyper_blocklist List of hyperslab blocks
H5S.get_select_hyper_nblocks Number of hyperslab blocks
H5S.get_select_npoints Number of elements in data space selection
H5S.get_select_type Type of data space selection
H5S.get_simple_extent_dims Data space size and maximum size
H5S.get_simple_extent_ndims Data space rank
H5S.get_simple_extent_npoints Number of elements in data space
H5S.get_simple_extent_type Data space class
Datatype (H5T)General Data Type Operation
H5T.close Close data type
H5T.commit Commit transient data type
H5T.committed Determine if data type is committed
H5T.copy Copy data type
H5T.create Create new data type
H5T.detect_class Determine of data type contains specific class
H5T.equal Determine equality of data types
H5T.get_class Data type class identifier
H5T.get_create_plist Copy of data type creation property list
H5T.get_native_type Native data type of dataset data type
H5T.get_size Size of data type in bytes
H5T.get_super Base data type
H5T.lock Lock data type
H5T.open Open named data type
Array Data Type
H5T.array_create Create array data type object
H5T.get_array_dims Array dimension extents
H5T.get_array_ndims Rank of array data type
Atomic Data Type Properties
H5T.get_cset Character set of string data type
H5T.get_ebias Exponent bias of floating-point type
H5T.get_fields Floating-point data type bit field information
H5T.get_inpad Internal padding type for floating-point data types
H5T.get_norm Mantissa normalization type
H5T.get_offset Bit offset of first significant bit
H5T.get_order Byte order of atomic data type
H5T.get_pad Padding type of least and most-significant bits
H5T.get_precision Precision of atomic data type
H5T.get_sign Sign type for integer data type
H5T.get_strpad Storage mechanism for string data type
H5T.set_cset Set character dataset for string data type
H5T.set_ebias Set exponent bias of floating-point data type
H5T.set_fields Set sizes and locations of floating-point bit fields
H5T.set_inpad Specify how unused internal bits are to be filled
H5T.set_norm Set mantissa normalization of floating-point data type
H5T.set_offset Set bit offset of first significant bit
H5T.set_order Set byte ordering of atomic data type
H5T.set_pad Set padding type for least and most significant bits
H5T.set_precision Set precision of atomic data type
H5T.set_sign Set sign property for integer data type
H5T.set_size Set size of data type in bytes
H5T.set_strpad Set storage mechanism for string data type
Compound Data Type
H5T.get_member_class Data type class for compound data type member
H5T.get_member_index Index of compound or enumeration type member
H5T.get_member_name Name of compound or enumeration type member
H5T.get_member_offset Offset of field of compound data type
H5T.get_member_type Data type of specified member
H5T.get_nmembers Number of elements in enumeration type
H5T.insert Add member to compound data type
H5T.pack Recursively remove padding from compound data type
Enumeration Data Type
H5T.enum_create Create new enumeration data type
H5T.enum_insert Insert enumeration data type member
H5T.enum_nameof Name of enumeration data type member
H5T.enum_valueof Value of enumeration data type member
H5T.get_member_value Value of enumeration data type member
Opaque Data Type Properties
H5T.get_tag Tag associated with opaque data type
H5T.set_tag Tag opaque data type with description
Variable-length Data Type
H5T.is_variable_str Determine if data type is variable-length string
H5T.vlen_create Create new variable-length data type
Filters and Compression (H5Z)
H5Z.filter_avail Determine if filter is available
H5Z.get_filter_info Information about filter
HDF4 Files

High-Level Functions
hdfinfo Information about HDF4 or HDF-EOS file
hdfread Read data from HDF4 or HDF-EOS file
hdftool (Not recommended) Browse and import data from HDF4 or HDF-EOS files
imread Read image from graphics file
imwrite Write image to graphics file
Low-Level Functions
matlab.io.hdf4.sd Interact directly with HDF4 multifile scientific data set (SD) interface
matlab.io.hdfeos.gd Low-level access to HDF-EOS grid data
matlab.io.hdfeos.sw Low-level access to HDF-EOS swath files
hdfan Gateway to HDF multifile annotation (AN) interface
hdfhx Gateway to HDF external data (HX) interface
hdfh Gateway to HDF H interface
hdfhd Gateway to HDF HD interface
hdfhe Gateway to HDF HE interface
hdfml Utilities for working with MATLAB HDF gateway functions
hdfpt Interface to HDF-EOS Point object
hdfv Gateway to HDF Vgroup (V) interface
hdfvf Gateway to VF functions in HDF Vdata interface
hdfvh Gateway to VH functions in HDF Vdata interface
hdfvs Gateway to VS functions in HDF Vdata interface
hdfdf24 Gateway to HDF 24-bit raster image (DF24) interface
hdfdfr8 Gateway to HDF 8-bit raster image (DFR8) interface

FITS Files

High-Level Functions
fitsdisp Display FITS metadata
fitsinfo Information about FITS file
fitsread Read data from FITS file
fitswrite Write image to FITS file
Low-Level FunctionsFile Access
createFile Create FITS file
openFile Open FITS file
openDiskFile Open FITS file
closeFile Close FITS file
deleteFile Delete FITS file
fileName Name of FITS file
fileMode I/O mode of FITS file
Image Manipulation
createImg Create FITS image
getImgSize Size of image
getImgType Data type of image
insertImg Insert FITS image after current image
readImg Read image data
setBscale Reset image scaling
writeImg Write to FITS image
Keywords
readCard Header record of keyword
readKey Keyword
readKeyCmplx Keyword as complex scalar value
readKeyDbl Keyword as double precision value
readKeyLongLong Keyword as int64
readKeyLongStr Long string value
readKeyUnit Physical units string from keyword
readRecord Header record specified by number
writeComment Write or append COMMENT keyword to CHU
writeDate Write DATE keyword to CHU
writeKey Update or add new keyword into current HDU
writeKeyUnit Write physical units string
writeHistory Write or append HISTORY keyword to CHU
deleteKey Delete key by name
deleteRecord Delete key by record number
getHdrSpace Number of keywords in header
Header Data Unit (HDU) Access
copyHDU Copy current HDU from one file to another
getHDUnum Number of current HDU in FITS file
getHDUtype Type of current HDU
getNumHDUs Total number of HDUs in FITS file
movAbsHDU Move to absolute HDU number
movNamHDU Move to first HDU having specific type and keyword values
movRelHDU Move relative number of HDUs from current HDU
writeChecksum Compute and write checksum for current HDU
deleteHDU Delete current HDU in FITS file
Image Compression
imgCompress Compress HDU from one file into another
isCompressedImg Determine if current image is compressed
setCompressionType Set image compression type
setHCompScale Set scale parameter for HCOMPRESS algorithm
setHCompSmooth Set smoothing for images compressed with HCOMPRESS
setTileDim Set tile dimensions
ASCII and Binary Tables
createTbl Create new ASCII or binary table extension
insertCol Insert column into table
insertRows Insert rows into table
insertATbl Insert ASCII table after current HDU
insertBTbl Insert binary table after current HDU
deleteCol Delete column from table
deleteRows Delete rows from table
getAColParms ASCII table information
getBColParms Binary table information
getColName Table column name
getColType Scaled column data type, repeat value, width
getEqColType Column data type, repeat value, width
getNumCols Number of columns in table
getNumRows Number of rows in table
readATblHdr Read header information from current ASCII table
readBTblHdr Read header information from current binary table
readCol Read rows of ASCII or binary table column
setTscale Reset image scaling
writeCol Write elements into ASCII or binary table column
Utilities
getConstantValue Numeric value of named constant
getVersion Revision number of the CFITSIO library
getOpenFiles List of open FITS files

Band-Interleaved Files

multibandread Read band-interleaved data from binary file


multibandwrite Write band-interleaved data to file

Common Data Format

cdfinfo Information about Common Data Format (CDF) file


cdfread Read data from Common Data Format (CDF) file
cdfepoch Convert date text or serial date number to CDF formatted dates
todatenum Convert CDF epoch object to MATLAB serial date number
cdflib Interact directly with CDF library

Audio and Video

VideoReader Create object to read video files


read Read one or more video frames
readFrame Read next video frame
hasFrame Determine if video frame is available to read
getFileFormats File formats that VideoReader supports
mmfileinfo Information about multimedia file
VideoWriter Create object to write video files
open Open file for writing video data
writeVideo Write video data to file
close Close file after writing video data
getProfiles Profiles and file formats that VideoWriter supports
audioread Read audio file
audiowrite Write audio file
lin2mu Convert linear audio signal to mu-law
mu2lin Convert mu-law audio signal to linear
audioinfo Information about audio file
audioplayer Object for playing audio
isplaying Determine if playback is in progress
pause Pause playback or recording
play Play audio from audioplayer object
playblocking Play audio from audioplayer object, hold control until playback completes
resume Resume playback or recording from paused state
stop Stop playback or recording
audiorecorder Object for recording audio
getaudiodata Store recorded audio signal in numeric array
getplayer Creates associated audioplayer object
isrecording Determine if recording is in progress
record Record audio to audiorecorder object
recordblocking Record audio to audiorecorder object, hold control until recording completes
audiodevinfo Information about audio device
sound Convert matrix of signal data to sound
soundsc Scale data and play as sound
beep Produce operating system beep sound
XML Documents

xmlread Read XML document and return Document Object Model node
xmlwrite Write XML Document Object Model node
xslt Transform XML document using XSLT engine

Workspace Variables and MAT-Files

load Load variables from file into workspace


save Save workspace variables to file
matfile Access and change variables in MAT-file without loading file into memory
disp Display value of variable
who List variables in workspace
whos List variables in workspace, with sizes and types
clear Remove items from workspace, freeing up system memory
clearvars Clear variables from memory
openvar Open workspace variable in Variables editor or other graphical editing tool

Low-Level File I/O

fclose Close one or all open files


feof Test for end of file
ferror File I/O error information
fgetl Read line from file, removing newline characters
fgets Read line from file, keeping newline characters
fileread Read contents of file as text
fopen Open file, or obtain information about open files
fprintf Write data to text file
fread Read data from binary file
frewind Move file position indicator to beginning of open file
fscanf Read data from text file
fseek Move to specified position in file
ftell Current position
fwrite Write data to binary file

TCP/IP Communication

tcpclient Create TCP/IP client object to communicate over TCP/IP


read Read data from remote host over TCP/IP
write Write data to remote host over TCP/IP
Bluetooth Low Energy Communication

blelist Scan nearby Bluetooth Low Energy peripheral devices


ble Connect to Bluetooth Low Energy peripheral device
characteristic Access a characteristic on Bluetooth Low Energy peripheral device
descriptor Access a descriptor on Bluetooth Low Energy peripheral device
read
Read characteristic or descriptor data on a Bluetooth Low Energy peripheral
device
write
Write data to a characteristic or descriptor on a Bluetooth Low Energy
peripheral device
subscribe Subscribe to notification or indication from a characteristic
unsubscribe Unsubscribe from notification and indication from a characteristic

Web Access

webread Read content from RESTful web service


webwrite Write data to RESTful web service
websave Save content from RESTful web service to file
weboptions Specify parameters for RESTful web service
web Open web page or file in browser
sendmail Send email message to address list
ftp Object to connect to FTP server and access its files
ascii Set FTP transfer mode to ASCII
binary Set FTP transfer mode to binary
cd Change or view current folder on FTP server
close Close connection to FTP server
delete Delete file on FTP server
dir List folder contents on FTP server
mget Download files from FTP server
mkdir Make new folder on FTP server
mput Upload file or folder to FTP server
rename Rename file on FTP server
rmdir Remove folder on FTP server

Internet of Things (IoT) Data

thingSpeakRead Read data stored in a ThingSpeak channel


thingSpeakWrite Write data to a ThingSpeak channel

JSON Format
jsondecode Decode JSON-formatted text
jsonencode Create JSON-formatted text from structured MATLAB data

Serial Port Devices

serialportlist List of serial ports connected to your system


serialport Connection to serial port
configureTerminator Set terminator for ASCII string communication on serial port
configureCallback Set serial port callback function and trigger
read Read data from serial port
readline Read line of ASCII string data from serial port
write Write data to serial port
writeline Write line of ASCII data to serial port
flush Flush serial port buffers
getpinstatus Get serial pin status
setRTS Set serial RTS pin
setDTR Set serial DTR pin

Large Files and Big Data

Datastore

datastore Create datastore for large collections of data


tabularTextDatastore Datastore for tabular text files
spreadsheetDatastore Datastore for spreadsheet files
imageDatastore Datastore for image data
parquetDatastore Datastore for collection of Parquet files
fileDatastore Datastore with custom file reader
read Read data in datastore
readall Read all data in datastore
preview Subset of data in datastore
partition Partition a datastore
numpartitions Number of datastore partitions
hasdata Determine if data is available to read
reset Reset datastore to initial state
combine Combine data from multiple datastores
transform Transform datastore
CombinedDatastore
Datastore to combine data read from multiple
underlying datastores
TransformedDatastore Datastore to transform underlying datastore
KeyValueDatastore
Datastore for key-value pair data for use with
mapreduce
TallDatastore Datastore for checkpointing tall arrays
matlab.io.Datastore Base datastore class
matlab.io.datastore.Partitionable Add parallelization support to datastore
matlab.io.datastore.HadoopLocationBased Add Hadoop support to datastore
matlab.io.datastore.Shuffleable Add shuffling support to datastore
matlab.io.datastore.DsFileSet File-set object for collection of files in datastore
matlab.io.datastore.DsFileReader File-reader object for files in a datastore

Tall Arrays

tall Create tall array


datastore Create datastore for large collections of data
gather
Collect tall array into memory after executing queued
operations
write
Write tall array to local and remote locations for
checkpointing
mapreducer Define execution environment for mapreduce or tall arrays
tallrng Control random number generation for tall arrays
istall Determine if input is tall array
classUnderlying Class of underlying data in tall array
isaUnderlying Determine if tall array data is of specified class
matlab.tall.transform
Transform array by applying function handle to blocks of
data
matlab.tall.reduce
Reduce arrays by applying reduction algorithm to blocks of
data
matlab.tall.movingWindow Apply moving window function to blocks of data
matlab.tall.blockMovingWindow
Apply moving window function and block reduction to
padded blocks of data

MapReduce

mapreduce Programming technique for analyzing data sets that do not fit in memory
datastore Create datastore for large collections of data
add Add single key-value pair to KeyValueStore
addmulti Add multiple key-value pairs to KeyValueStore
hasnext Determine if ValueIterator has one or more values available
getnext Get next value from ValueIterator
mapreducer Define execution environment for mapreduce or tall arrays
gcmr Get current mapreducer configuration
KeyValueStore Store key-value pairs for use with mapreduce
ValueIterator An iterator over intermediate values for use with mapreduce

Large MAT-Files

matfile Access and change variables in MAT-file without loading file into memory

Parquet Files

parquetread Read columnar data from a Parquet file


parquetwrite Write columnar data to Parquet file
parquetinfo Get information about Parquet file
parquetDatastore Datastore for collection of Parquet files

Memory Mapping

memmapfile Create memory map to a file

Preprocessing Data

ismissing Find missing values


rmmissing Remove missing entries
fillmissing Fill missing values
missing Create missing values
standardizeMissing Insert standard missing values
isoutlier Find outliers in data
filloutliers Detect and replace outliers in data
rmoutliers Detect and remove outliers in data
movmad Moving median absolute deviation
ischange Find abrupt changes in data
islocalmin Find local minima
islocalmax Find local maxima
smoothdata Smooth noisy data
movmean Moving mean
movmedian Moving median
detrend Remove polynomial trend
normalize Normalize data
rescale Scale range of array elements
discretize Group data into bins or categories
groupcounts Number of group elements
groupfilter Filter by group
groupsummary Group summary computations
grouptransform Transform by group
histcounts Histogram bin counts
histcounts2 Bivariate histogram bin counts
findgroups Find groups and return group numbers
splitapply Split data into groups and apply function
rowfun Apply function to table or timetable rows
varfun Apply function to table or timetable variables
accumarray Construct array with accumulation

Descriptive Statistics

min Minimum elements of an array


mink Find k smallest elements of array
max Maximum elements of an array
maxk Find k largest elements of array
bounds Smallest and largest elements
topkrows Top rows in sorted order
mean Average or mean value of array
median Median value of array
mode Most frequent values in array
std Standard deviation
var Variance
corrcoef Correlation coefficients
cov Covariance
xcorr Cross-correlation
xcov Cross-covariance
cummax Cumulative maximum
cummin Cumulative minimum
movmad Moving median absolute deviation
movmax Moving maximum
movmean Moving mean
movmedian Moving median
movmin Moving minimum
movprod Moving product
movstd Moving standard deviation
movsum Moving sum
movvar Moving variance

Visual Exploration

plotedit Interactively edit and annotate plots


plottools Show or hide plot tools
showplottool Show or hide figure plot tool
figurepalette Show or hide Figure Palette
plotbrowser Show or hide figure Plot Browser
propertyeditor Show or hide Property Editor
propedit Open Property Editor
datatip Create data tip
dataTipTextRow Add row to data tips
axtoolbar Create axes toolbar
axtoolbarbtn Add buttons to axes toolbar
addToolbarExplorationButtons Add data exploration buttons to figure toolbar
removeToolbarExplorationButtons Remove data exploration buttons from figure toolbar
panInteraction Pan interaction
rulerPanInteraction Ruler-pan interaction
zoomInteraction Zoom interaction
regionZoomInteraction Region-zoom interaction
rotateInteraction Rotate interaction
dataTipInteraction Data tip interaction
enableDefaultInteractivity Enable built-in axes interactions
disableDefaultInteractivity Disable built-in axes interactions
pan Pan view of graph interactively
zoom Turn zooming on or off or magnify by factor
rotate3d Rotate 3-D view using mouse
datacursormode Enable, disable, and manage interactive data cursor mode
brush Interactively mark data values in a chart
linkdata Automatically update charted data
linkaxes Synchronize limits of multiple axes
linkprop
Keep same value for corresponding properties of graphics
objects
refreshdata Refresh charted data
Mathematics
Elementary Math

Arithmetic

plus Addition
sum Sum of array elements
cumsum Cumulative sum
movsum Moving sum
minus Subtraction
diff Differences and approximate derivatives
times Multiplication
mtimes Matrix multiplication
prod Product of array elements
cumprod Cumulative product
rdivide Right array division
ldivide Left array division
mrdivide Solve systems of linear equations xA = B for x
mldivide Solve systems of linear equations Ax = B for x
power Element-wise power
mpower Matrix power
uminus Unary minus
uplus Unary plus
mod Remainder after division (modulo operation)
rem Remainder after division
idivide Integer division with rounding option
ceil Round toward positive infinity
fix Round toward zero
floor Round toward negative infinity
round Round to nearest decimal or integer
bsxfun Apply element-wise operation to two arrays with implicit expansion enabled

Trigonometry

sin Sine of argument in radians


sind Sine of argument in degrees
sinpi Compute sin(X*pi) accurately
asin Inverse sine in radians
asind Inverse sine in degrees
sinh Hyperbolic sine
asinh Inverse hyperbolic sine
cos Cosine of argument in radians
cosd Cosine of argument in degrees
cospi Compute cos(X*pi) accurately
acos Inverse cosine in radians
acosd Inverse cosine in degrees
cosh Hyperbolic cosine
acosh Inverse hyperbolic cosine
tan Tangent of argument in radians
tand Tangent of argument in degrees
atan Inverse tangent in radians
atand Inverse tangent in degrees
atan2 Four-quadrant inverse tangent
atan2d Four-quadrant inverse tangent in degrees
tanh Hyperbolic tangent
atanh Inverse hyperbolic tangent
csc Cosecant of input angle in radians
cscd Cosecant of argument in degrees
acsc Inverse cosecant in radians
acscd Inverse cosecant in degrees
csch Hyperbolic cosecant
acsch Inverse hyperbolic cosecant
sec Secant of angle in radians
secd Secant of argument in degrees
asec Inverse secant in radians
asecd Inverse secant in degrees
sech Hyperbolic secant
asech Inverse hyperbolic secant
cot Cotangent of angle in radians
cotd Cotangent of argument in degrees
acot Inverse cotangent in radians
acotd Inverse cotangent in degrees
coth Hyperbolic cotangent
acoth Inverse hyperbolic cotangent
hypot Square root of sum of squares (hypotenuse)
deg2rad Convert angle from degrees to radians
rad2deg Convert angle from radians to degrees
cart2pol Transform Cartesian coordinates to polar or cylindrical
cart2sph Transform Cartesian coordinates to spherical
pol2cart Transform polar or cylindrical coordinates to Cartesian
sph2cart Transform spherical coordinates to Cartesian

Exponents and Logarithms

exp Exponential
expm1 Compute exp(x)-1 accurately for small values of x
log Natural logarithm
log10 Common logarithm (base 10)
log1p Compute log(1+x) accurately for small values of x
log2 Base 2 logarithm and floating-point number dissection
nextpow2 Exponent of next higher power of 2
nthroot Real nth root of real numbers
pow2 Base 2 power and scale floating-point numbers
reallog Natural logarithm for nonnegative real arrays
realpow Array power for real-only output
realsqrt Square root for nonnegative real arrays
sqrt Square root

Complex Numbers

abs Absolute value and complex magnitude


angle Phase angle
complex Create complex array
conj Complex conjugate
cplxpair Sort complex numbers into complex conjugate pairs
i Imaginary unit
imag Imaginary part of complex number
isreal Determine whether array is real
j Imaginary unit
real Real part of complex number
sign Sign function (signum function)
unwrap Shift phase angles

Discrete Math
factor Prime factors
factorial Factorial of input
gcd Greatest common divisor
isprime Determine which array elements are prime
lcm Least common multiple
nchoosek Binomial coefficient or all combinations
perms All possible permutations
matchpairs Solve linear assignment problem
primes Prime numbers less than or equal to input value
rat Rational fraction approximation
rats Rational output

Polynomials

poly Polynomial with specified roots or characteristic polynomial


polyeig Polynomial eigenvalue problem
polyfit Polynomial curve fitting
residue Partial fraction expansion (partial fraction decomposition)
roots Polynomial roots
polyval Polynomial evaluation
polyvalm Matrix polynomial evaluation
conv Convolution and polynomial multiplication
deconv Deconvolution and polynomial division
polyint Polynomial integration
polyder Polynomial differentiation

Special Functions

airy Airy Functions


besselh Bessel function of third kind (Hankel function)
besseli Modified Bessel function of first kind
besselj Bessel function of first kind
besselk Modified Bessel function of second kind
bessely Bessel function of second kind
beta Beta function
betainc Incomplete beta function
betaincinv Beta inverse cumulative distribution function
betaln Logarithm of beta function
ellipj Jacobi elliptic functions
ellipke Complete elliptic integrals of first and second kind
erf Error function
erfc Complementary error function
erfcinv Inverse complementary error function
erfcx Scaled complementary error function
erfinv Inverse error function
expint Exponential integral
gamma Gamma function
gammainc Incomplete gamma function
gammaincinv Inverse incomplete gamma function
gammaln Logarithm of gamma function
legendre Associated Legendre functions
psi Psi (polygamma) function

Constants and Test Matrices

eps Floating-point relative accuracy


flintmax Largest consecutive integer in floating-point format
i Imaginary unit
j Imaginary unit
Inf Create array of all Inf values
pi Ratio of circle's circumference to its diameter
NaN Create array of all NaN values
isfinite Determine which array elements are finite
isinf Determine which array elements are infinite
isnan Determine which array elements are NaN
compan Companion matrix
gallery Test matrices
hadamard Hadamard matrix
hankel Hankel matrix
hilb Hilbert matrix
invhilb Inverse of Hilbert matrix
magic Magic square
pascal Pascal matrix
rosser Classic symmetric eigenvalue test problem
toeplitz Toeplitz matrix
vander Vandermonde matrix
wilkinson Wilkinson's eigenvalue test matrix
Linear Algebra

mldivide Solve systems of linear equations Ax = B for x


mrdivide Solve systems of linear equations xA = B for x
decomposition Matrix decomposition for solving linear systems
lsqminnorm Minimum norm least-squares solution to linear equation
linsolve Solve linear system of equations
inv Matrix inverse
pinv Moore-Penrose pseudoinverse
lscov Least-squares solution in presence of known covariance
lsqnonneg Solve nonnegative linear least-squares problem
sylvester Solve Sylvester equation AX + XB = C for X
eig Eigenvalues and eigenvectors
eigs Subset of eigenvalues and eigenvectors
balance Diagonal scaling to improve eigenvalue accuracy
svd Singular value decomposition
svds Subset of singular values and vectors
gsvd Generalized singular value decomposition
ordeig Eigenvalues of quasitriangular matrices
ordqz Reorder eigenvalues in QZ factorization
ordschur Reorder eigenvalues in Schur factorization
polyeig Polynomial eigenvalue problem
qz QZ factorization for generalized eigenvalues
hess Hessenberg form of matrix
schur Schur decomposition
rsf2csf Convert real Schur form to complex Schur form
cdf2rdf Convert complex diagonal form to real block diagonal form
lu LU matrix factorization
ldl Block LDL' factorization for Hermitian indefinite matrices
chol Cholesky factorization
cholupdate Rank 1 update to Cholesky factorization
qr QR decomposition
qrdelete Remove column or row from QR factorization
qrinsert Insert column or row into QR factorization
qrupdate Rank 1 update to QR factorization
planerot Givens plane rotation
transpose Transpose vector or matrix
ctranspose Complex conjugate transpose
mtimes Matrix multiplication
mpower Matrix power
sqrtm Matrix square root
expm Matrix exponential
logm Matrix logarithm
funm Evaluate general matrix function
kron Kronecker tensor product
cross Cross product
dot Dot product
bandwidth Lower and upper matrix bandwidth
tril Lower triangular part of matrix
triu Upper triangular part of matrix
isbanded Determine if matrix is within specific bandwidth
isdiag Determine if matrix is diagonal
ishermitian Determine if matrix is Hermitian or skew-Hermitian
issymmetric Determine if matrix is symmetric or skew-symmetric
istril Determine if matrix is lower triangular
istriu Determine if matrix is upper triangular
norm Vector and matrix norms
normest 2-norm estimate
vecnorm Vector-wise norm
cond Condition number for inversion
condest 1-norm condition number estimate
rcond Reciprocal condition number
condeig Condition number with respect to eigenvalues
det Matrix determinant
null Null space of matrix
orth Orthonormal basis for range of matrix
rank Rank of matrix
rref Reduced row echelon form (Gauss-Jordan elimination)
trace Sum of diagonal elements
subspace Angle between two subspaces

Random Number Generation

rand Uniformly distributed random numbers


randn Normally distributed random numbers
randi Uniformly distributed pseudorandom integers
randperm Random permutation of integers
rng Control random number generation
RandStream Random number stream

Interpolation

interp1 1-D data interpolation (table lookup)


interp2 Interpolation for 2-D gridded data in meshgrid format
interp3 Interpolation for 3-D gridded data in meshgrid format
interpn Interpolation for 1-D, 2-D, 3-D, and N-D gridded data in ndgrid format
griddedInterpolant Gridded data interpolation
pchip Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)
makima Modified Akima piecewise cubic Hermite interpolation
spline Cubic spline data interpolation
ppval Evaluate piecewise polynomial
mkpp Make piecewise polynomial
unmkpp Extract piecewise polynomial details
padecoef Padé approximation of time delays
interpft 1-D interpolation (FFT method)
ndgrid Rectangular grid in N-D space
meshgrid 2-D and 3-D grids
griddata Interpolate 2-D or 3-D scattered data
griddatan Interpolate N-D scattered data
scatteredInterpolant Interpolate 2-D or 3-D scattered data

Optimization

fminbnd Find minimum of single-variable function on fixed interval


fminsearch
Find minimum of unconstrained multivariable function using derivative-free
method
lsqnonneg Solve nonnegative linear least-squares problem
fzero Root of nonlinear function
optimget Optimization options values
optimset Create or modify optimization options structure

Numerical Integration and Differential Equations

Ordinary Differential Equations

ode45 Solve nonstiff differential equations — medium order method


ode23 Solve nonstiff differential equations — low order method
ode113 Solve nonstiff differential equations — variable order method
ode15s Solve stiff differential equations and DAEs — variable order method
ode23s Solve stiff differential equations — low order method
ode23t Solve moderately stiff ODEs and DAEs — trapezoidal rule
ode23tb
Solve stiff differential equations — trapezoidal rule + backward differentiation
formula
ode15i Solve fully implicit differential equations — variable order method
decic Compute consistent initial conditions for ode15i
odeget Extract ODE option values
odeset Create or modify options structure for ODE and PDE solvers
deval Evaluate differential equation solution structure
odextend Extend solution to ODE

Boundary Value Problems

bvp4c Solve boundary value problem — fourth-order method


bvp5c Solve boundary value problem — fifth-order method
bvpinit Form initial guess for boundary value problem solver
bvpget Extract properties from options structure created with bvpset
bvpset Create or alter options structure of boundary value problem
deval Evaluate differential equation solution structure
bvpxtend Form guess structure for extending boundary value solutions

Delay Differential Equations

dde23 Solve delay differential equations (DDEs) with constant delays


ddesd Solve delay differential equations (DDEs) with general delays
ddensd Solve delay differential equations (DDEs) of neutral type
ddeget Extract properties from delay differential equations options structure
ddeset Create or alter delay differential equations options structure
deval Evaluate differential equation solution structure

1-D Partial Differential Equations

pdepe Solve 1-D parabolic and elliptic PDEs


odeget Extract ODE option values
odeset Create or modify options structure for ODE and PDE solvers
pdeval Interpolate numerical solution of PDE
Numerical Integration and Differentiation

integral Numerical integration


integral2 Numerically evaluate double integral
integral3 Numerically evaluate triple integral
quadgk Numerically evaluate integral — Gauss-Kronrod quadrature
quad2d Numerically evaluate double integral — tiled method
cumtrapz Cumulative trapezoidal numerical integration
trapz Trapezoidal numerical integration
del2 Discrete Laplacian
diff Differences and approximate derivatives
gradient Numerical gradient
polyint Polynomial integration
polyder Polynomial differentiation

Fourier Analysis and Filtering

fft Fast Fourier transform


fft2 2-D fast Fourier transform
fftn N-D fast Fourier transform
fftshift Shift zero-frequency component to center of spectrum
fftw Define method for determining FFT algorithm
ifft Inverse fast Fourier transform
ifft2 2-D inverse fast Fourier transform
ifftn Multidimensional inverse fast Fourier transform
ifftshift Inverse zero-frequency shift
nextpow2 Exponent of next higher power of 2
interpft 1-D interpolation (FFT method)
conv Convolution and polynomial multiplication
conv2 2-D convolution
convn N-D convolution
deconv Deconvolution and polynomial division
filter 1-D digital filter
filter2 2-D digital filter
ss2tf Convert state-space representation to transfer function
padecoef Padé approximation of time delays

Sparse Matrices
spalloc Allocate space for sparse matrix
spdiags Extract nonzero diagonals and create sparse band and diagonal matrices
speye Sparse identity matrix
sprand Sparse uniformly distributed random matrix
sprandn Sparse normally distributed random matrix
sprandsym Sparse symmetric random matrix
sparse Create sparse matrix
spconvert Import from sparse matrix external format
issparse Determine whether input is sparse
nnz Number of nonzero matrix elements
nonzeros Nonzero matrix elements
nzmax Amount of storage allocated for nonzero matrix elements
spfun Apply function to nonzero sparse matrix elements
spones Replace nonzero sparse matrix elements with ones
spparms Set parameters for sparse matrix routines
spy Visualize sparsity pattern of matrix
find Find indices and values of nonzero elements
full Convert sparse matrix to full storage
dissect Nested dissection permutation
amd Approximate minimum degree permutation
colamd Column approximate minimum degree permutation
colperm Sparse column permutation based on nonzero count
dmperm Dulmage-Mendelsohn decomposition
randperm Random permutation of integers
symamd Symmetric approximate minimum degree permutation
symrcm Sparse reverse Cuthill-McKee ordering
pcg Preconditioned conjugate gradients method
minres Minimum residual method
symmlq Symmetric LQ method
gmres Generalized minimum residual method (with restarts)
bicg Biconjugate gradients method
bicgstab Biconjugate gradients stabilized method
bicgstabl Biconjugate gradients stabilized (l) method
cgs Conjugate gradients squared method
qmr Quasi-minimal residual method
tfqmr Transpose-free quasi-minimal residual method
lsqr LSQR method
equilibrate Matrix scaling for improved conditioning
ichol Incomplete Cholesky factorization
ilu Incomplete LU factorization
eigs Subset of eigenvalues and eigenvectors
svds Subset of singular values and vectors
normest 2-norm estimate
condest 1-norm condition number estimate
sprank Structural rank
etree Elimination tree
symbfact Symbolic factorization analysis
spaugment Form least-squares augmented system
etreeplot Plot elimination tree
treelayout Lay out tree or forest
treeplot Plot picture of tree
gplot Plot nodes and edges in adjacency matrix
unmesh Convert edge matrix to coordinate and Laplacian matrices

Graph and Network Algorithms

graph Graph with undirected edges


digraph Graph with directed edges
addnode Add new node to graph
rmnode Remove node from graph
addedge Add new edge to graph
rmedge Remove edge from graph
flipedge Reverse edge directions
numnodes Number of nodes in graph
numedges Number of edges in graph
findnode Locate node in graph
findedge Locate edge in graph
edgecount Number of edges between two nodes
reordernodes Reorder graph nodes
subgraph Extract subgraph
bfsearch Breadth-first graph search
dfsearch Depth-first graph search
centrality Measure node importance
maxflow Maximum flow in graph
conncomp Connected graph components
biconncomp Biconnected graph components
condensation Graph condensation
bctree Block-cut tree graph
minspantree Minimum spanning tree of graph
toposort Topological order of directed acyclic graph
isdag Determine if graph is acyclic
transclosure Transitive closure
transreduction Transitive reduction
isisomorphic Determine whether two graphs are isomorphic
isomorphism Compute isomorphism between two graphs
ismultigraph Determine whether graph has multiple edges
simplify Reduce multigraph to simple graph
shortestpath Shortest path between two single nodes
shortestpathtree Shortest path tree from node
distances Shortest path distances of all node pairs
adjacency Graph adjacency matrix
incidence Graph incidence matrix
laplacian Graph Laplacian matrix
degree Degree of graph nodes
neighbors Neighbors of graph node
nearest Nearest neighbors within radius
indegree In-degree of nodes
outdegree Out-degree of nodes
predecessors Node predecessors
successors Node successors
inedges Incoming edges to node
outedges Outgoing edges from node
plot Plot graph nodes and edges
labeledge Label graph edges
labelnode Label graph nodes
layout Change layout of graph plot
highlight Highlight nodes and edges in plotted graph
GraphPlot Graph plot for directed and undirected graphs

Computational Geometry

Triangulation Representation

triangulation Triangulation in 2-D or 3-D


barycentricToCartesian Convert coordinates from barycentric to Cartesian
cartesianToBarycentric Convert coordinates from Cartesian to barycentric
circumcenter Circumcenter of triangle or tetrahedron
edgeAttachments Triangles or tetrahedra attached to specified edge
edges Triangulation edges
faceNormal Triangulation unit normal vectors
featureEdges Handle sharp edges of triangulation
freeBoundary Free boundary facets
incenter Incenter of triangulation elements
isConnected Test if two vertices are connected by an edge
nearestNeighbor Closest vertex
neighbors Triangle or tetrahedron neighbors
pointLocation Triangle or tetrahedron enclosing point
size Size of triangulation connectivity list
vertexAttachments Triangles or tetrahedra attached to vertex
vertexNormal Triangulation vertex normal
boundaryshape Create polyshape from 2-D triangulation
stlread Create triangulation from STL file
stlwrite Create STL file from triangulation
tetramesh Tetrahedron mesh plot
trimesh Triangular mesh plot
triplot 2-D triangular plot
trisurf Triangular surface plot

Delaunay Triangulation

delaunay Delaunay triangulation


delaunayn N-D Delaunay triangulation
delaunayTriangulation Delaunay triangulation in 2-D and 3-D
convexHull Convex hull of Delaunay triangulation
isInterior Query interior points of Delaunay triangulation
voronoiDiagram Voronoi diagram of Delaunay triangulation
barycentricToCartesian Convert coordinates from barycentric to Cartesian
cartesianToBarycentric Convert coordinates from Cartesian to barycentric
circumcenter Circumcenter of triangle or tetrahedron
edgeAttachments Triangles or tetrahedra attached to specified edge
edges Triangulation edges
faceNormal Triangulation unit normal vectors
featureEdges Handle sharp edges of triangulation
freeBoundary Free boundary facets
incenter Incenter of triangulation elements
isConnected Test if two vertices are connected by an edge
nearestNeighbor Closest vertex
neighbors Triangle or tetrahedron neighbors
pointLocation Triangle or tetrahedron enclosing point
size Size of triangulation connectivity list
vertexAttachments Triangles or tetrahedra attached to vertex
vertexNormal Triangulation vertex normal
boundaryshape Create polyshape from 2-D triangulation
stlwrite Create STL file from triangulation
tetramesh Tetrahedron mesh plot
trimesh Triangular mesh plot
triplot 2-D triangular plot
trisurf Triangular surface plot

Spatial Search

triangulation Triangulation in 2-D or 3-D


delaunayTriangulation Delaunay triangulation in 2-D and 3-D
dsearchn Nearest point search
tsearchn N-D closest simplex search
delaunay Delaunay triangulation
delaunayn N-D Delaunay triangulation

Bounding Regions

boundary Boundary of a set of points in 2-D or 3-D


convhull Convex hull
convhulln N-D convex hull
alphaShape Polygons and polyhedra from points in 2-D and 3-D
alphaSpectrum Alpha values giving distinct alpha shapes
criticalAlpha Alpha radius defining critical transition in shape
numRegions Number of regions in alpha shape
inShape Determine if point is inside alpha shape
alphaTriangulation Triangulation that fills alpha shape
boundaryFacets Boundary facets of alpha shape
perimeter Perimeter of 2-D alpha shape
area Area of 2-D alpha shape
surfaceArea Surface area of 3-D alpha shape
volume Volume of 3-D alpha shape
plot Plot alpha shape
nearestNeighbor Determine nearest alpha shape boundary point

Voronoi Diagram

voronoi Voronoi diagram


voronoin N-D Voronoi diagram
patch Plot one or more filled polygonal regions

Elementary Polygons

boundaryshape Create polyshape from 2-D triangulation


inpolygon Points located inside or on edge of polygonal region
nsidedpoly Regular polygon
polyarea Area of polygon
polybuffer Create buffer around points, lines, or polyshape objects
rectint Rectangle intersection area
polyshape 2-D polygons
addboundary Add polyshape boundary
rmboundary Remove polyshape boundary
rmholes Remove holes in polyshape
rmslivers Remove polyshape boundary outliers
rotate Rotate polyshape
scale Scale polyshape
simplify Simplify polyshape boundaries
sortboundaries Sort polyshape boundaries
sortregions Sort polyshape regions
translate Translate polyshape
boundary Vertex coordinates of polyshape boundary
holes Convert polyshape hole boundaries to array of polyshape objects
ishole Determine if polyshape boundary is a hole
isinterior Query points inside polyshape
issimplified Determine if polyshape is well-defined
nearestvertex Query nearest polyshape vertex
numboundaries Number of polyshape boundaries
numsides Number of polyshape sides
overlaps Determine whether polyshape objects overlap
plot Plot polyshape
regions Access polyshape regions
area Area of polyshape
boundingbox Bounding box of polyshape
centroid Centroid of polyshape
convhull Convex hull of polyshape
turningdist Compute turning distance between polyshape objects
triangulation Triangulate polyshape
perimeter Perimeter of polyshape
intersect Intersection of polyshape objects
subtract Difference of two polyshape objects
union Union of polyshape objects
xor Exclusive OR of two polyshape objects

Graphics
2-D and 3-D Plots

Line Plots

plot 2-D line plot


plot3 3-D point or line plot
stairs Stairstep graph
errorbar Line plot with error bars
area Filled area 2-D plot
stackedplot Stacked plot of several variables with common x-axis
loglog Log-log scale plot
semilogx Semilogarithmic plot
semilogy Semilogarithmic plot
fplot Plot expression or function
fimplicit Plot implicit function
fplot3 3-D parametric curve plotter
LineSpec (Line Specification) Line specification
ColorSpec (Color Specification) Color specification

Data Distribution Plots

histogram Histogram plot


histogram2 Bivariate histogram plot
morebins Increase number of histogram bins
fewerbins Decrease number of histogram bins
histcounts Histogram bin counts
histcounts2 Bivariate histogram bin counts
scatter Scatter plot
scatter3 3-D scatter plot
binscatter Binned scatter plot
scatterhistogram Create scatter plot with histograms
spy Visualize sparsity pattern of matrix
plotmatrix Scatter plot matrix
pie Pie chart
pie3 3-D pie chart
heatmap Create heatmap chart
sortx Sort elements in heatmap row
sorty Sort elements in heatmap column
wordcloud Create word cloud chart from text data
parallelplot Create parallel coordinates plot

Discrete Data Plots

bar Bar graph


barh Horizontal bar graph
bar3 Plot 3-D bar graph
bar3h Plot horizontal 3-D bar graph
pareto Pareto chart
stem Plot discrete sequence data
stem3 Plot 3-D discrete sequence data
scatter Scatter plot
scatter3 3-D scatter plot
stairs Stairstep graph

Geographic Plots

geoplot Plot line in geographic coordinates


geoscatter Scatter chart in geographic coordinates
geobubble Visualize data values at specific geographic locations
geodensityplot Geographic density plot
geobasemap Set or query basemap
geolimits Set or query geographic limits
geoaxes Create geographic axes
geotickformat Set or query geographic tick label format

Polar Plots

polarplot Plot line in polar coordinates


polarscatter Scatter chart in polar coordinates
polarhistogram Histogram chart in polar coordinates
compass Plot arrows emanating from origin
ezpolar Easy-to-use polar coordinate plotter
rlim Set or query r-axis limits for polar axes
thetalim Set or query theta-axis limits for polar axes
rticks Set or query r-axis tick values
thetaticks Set or query theta-axis tick values
rticklabels Set or query r-axis tick labels
thetaticklabels Set or query theta-axis tick labels
rtickformat Specify r-axis tick label format
thetatickformat Specify theta-axis tick label format
rtickangle Rotate r-axis tick labels
polaraxes Create polar axes

Contour Plots

contour Contour plot of matrix


contourf Filled 2-D contour plot
contourc Low-level contour plot computation
contour3 3-D contour plot
contourslice Draw contours in volume slice planes
clabel Label contour plot elevation
fcontour Plot contours

Vector Fields

feather Plot velocity vectors


quiver Quiver or velocity plot
compass Plot arrows emanating from origin
quiver3 3-D quiver or velocity plot
streamslice Plot streamlines in slice planes
streamline Plot streamlines from 2-D or 3-D vector data
Surfaces, Volumes, and Polygons

Surface and Mesh Plots

surf Surface plot


surfc Contour plot under surface plot
surface Primitive surface plot
surfl Surface plot with colormap-based lighting
surfnorm Surface normals
mesh Mesh surface plot
meshc Contour plot under mesh surface plot
meshz Mesh surface plot with curtain
hidden Remove hidden lines from mesh plot
fsurf Plot 3-D surface
fmesh Plot 3-D mesh
fimplicit3 Plot 3-D implicit function
waterfall Waterfall plot
ribbon Ribbon plot
contour3 3-D contour plot
peaks Example function of two variables
cylinder Generate cylinder
ellipsoid Generate ellipsoid
sphere Generate sphere
pcolor Pseudocolor plot
surf2patch Convert surface data to patch data

Volume Visualization

contourslice Draw contours in volume slice planes


flow Simple function of three variables
isocaps Compute isosurface end-cap geometry
isocolors Calculate isosurface and patch colors
isonormals Compute normals of isosurface vertices
isosurface Extract isosurface data from volume data
reducepatch Reduce number of patch faces
reducevolume Reduce number of elements in volume data set
shrinkfaces Reduce size of patch faces
slice Volume slice planes
smooth3 Smooth 3-D data
subvolume Extract subset of volume data set
volumebounds Coordinate and color limits for volume data
coneplot Plot velocity vectors as cones in 3-D vector field
curl Compute curl and angular velocity of vector field
divergence Compute divergence of vector field
interpstreamspeed Interpolate stream-line vertices from flow speed
stream2 Compute 2-D streamline data
stream3 Compute 3-D streamline data
streamline Plot streamlines from 2-D or 3-D vector data
streamparticles Plot stream particles
streamribbon 3-D stream ribbon plot from vector volume data
streamslice Plot streamlines in slice planes
streamtube Create 3-D stream tube plot

Polygons

fill Filled 2-D polygons


fill3 Filled 3-D polygons
patch Plot one or more filled polygonal regions
surf2patch Convert surface data to patch data

Animation

movie Play recorded movie frames


getframe Capture axes or figure as movie frame
frame2im Return image data associated with movie frame
im2frame Convert image to movie frame
animatedline Create animated line
addpoints Add points to animated line
getpoints Return points that define animated line
clearpoints Clear points from animated line
comet 2-D comet plot
comet3 3-D comet plot
drawnow Update figures and process callbacks
refreshdata Refresh charted data

Formatting and Annotation

Labels and Annotations


title Add title
sgtitle Add title to subplot grid
xlabel Label x-axis
ylabel Label y-axis
zlabel Label z-axis
legend Add legend to axes
text Add text descriptions to data points
gtext Add text to figure using mouse
xline Vertical line with constant x-value
yline Horizontal line with constant y-value
annotation Create annotations
datatip Create data tip
line Create primitive line
rectangle Create rectangle with sharp or curved corners
texlabel Format text with TeX characters
ginput Identify axes coordinates

Axes Appearance

xlim Set or query x-axis limits


ylim Set or query y-axis limits
zlim Set or query z-axis limits
axis Set axis limits and aspect ratios
box Display axes outline
daspect Control data unit length along each axis
pbaspect Control relative lengths of each axis
grid Display or hide axes grid lines
xticks Set or query x-axis tick values
yticks Set or query y-axis tick values
zticks Set or query z-axis tick values
xticklabels Set or query x-axis tick labels
yticklabels Set or query y-axis tick labels
zticklabels Set or query z-axis tick labels
xtickformat Specify x-axis tick label format
ytickformat Specify y-axis tick label format
ztickformat Specify z-axis tick label format
xtickangle Rotate x-axis tick labels
ytickangle Rotate y-axis tick labels
ztickangle Rotate z-axis tick labels
datetick Date formatted tick labels
ruler2num Convert data from specific ruler to numeric data
num2ruler Convert numeric data for use with specific ruler
hold Retain current plot when adding new plots
yyaxis Create chart with two y-axes
legend Add legend to axes
colororder Set color order for visualizing multiple data series
tiledlayout Create tiled chart layout
nexttile Create axes in tiled chart layout
subplot Create axes in tiled positions
cla Clear axes
axes Create Cartesian axes
figure Create figure window

Colormaps

colormap View and set current colormap


colorbar Colorbar showing color scale
rgbplot Plot colormap
brighten Brighten or darken colormap
contrast Create grayscale colormap to enhance image contrast
caxis Set colormap limits
spinmap Rotate colormap colors
hsv2rgb Convert HSV colors to RGB
rgb2hsv Convert RGB colors to HSV
parula Parula colormap array
jet Jet colormap array
hsv HSV colormap array
hot Hot colormap array
cool Cool colormap array
spring Spring colormap array
summer Summer colormap array
autumn Autumn colormap array
winter Winter colormap array
gray Gray colormap array
bone Bone colormap array
copper Copper colormap array
pink Pink colormap array
lines Lines colormap array
colorcube Colorcube colormap array
prism Prism colormap array
flag Flag colormap array

3-D Scene Control

Camera Views

view Camera line of sight


rotate Rotate object about specified origin and direction
makehgtform Create 4-by-4 transform matrix
viewmtx View transformation matrices
cameratoolbar Control camera toolbar programmatically
campan Rotate camera target around camera position
camzoom Zoom in and out on scene
camdolly Move camera position and target
camlookat Position camera to view object or group of objects
camorbit Rotate camera position around camera target
campos Set or query camera position
camproj Set or query projection type
camroll Rotate camera about view axis
camtarget Set or query location of camera target
camup Set or query camera up vector
camva Set or query camera view angle

Lighting, Transparency, and Shading

camlight Create or move light object in camera coordinates


light Create light
lightangle Create or position light object in spherical coordinates
lighting Specify lighting algorithm
shading Set color shading properties
diffuse Calculate diffuse reflectance
material Control reflectance properties of surfaces and patches
specular Calculate specular reflectance
alim Set or query axes alpha limits
alpha Add transparency to objects in axes
alphamap Specify figure alphamap (transparency)

Images

imshow Display image


image Display image from array
imagesc Display image with scaled colors
imread Read image from graphics file
imresize Resize image
imtile Combine multiple image frames into one rectangular tiled image
imwrite Write image to graphics file
imfinfo Information about graphics file
imformats Manage image file format registry
frame2im Return image data associated with movie frame
im2frame Convert image to movie frame
im2java Convert image to Java image
im2double Convert image to double precision
ind2rgb Convert indexed image to RGB image
rgb2gray Convert RGB image or colormap to grayscale
rgb2ind Convert RGB image to indexed image
imapprox Approximate indexed image by reducing number of colors
dither Convert image, increasing apparent color resolution by dithering
cmpermute Rearrange colors in colormap

cmunique
Eliminate duplicate colors in colormap; convert grayscale or truecolor image to
indexed image

Printing and Saving

print Print figure or save to specific file format


saveas Save figure to specific file format
getframe Capture axes or figure as movie frame
savefig Save figure and contents to FIG-file
openfig Open figure saved in FIG-file
orient Paper orientation for printing or saving
hgexport Export figure
printopt Configure printer defaults

Graphics Objects
Graphics Object Properties

get Query graphics object properties


set Set graphics object properties
reset Reset graphics object properties to their defaults

Graphics Object Identification

gca Current axes or chart


gcf Current figure handle
gcbf Handle of figure containing object whose callback is executing
gcbo Handle of object whose callback is executing
gco Handle of current object
groot Graphics root object
ancestor Ancestor of graphics object
allchild Find all children of specified objects
findall Find all graphics objects
findobj Locate graphics objects with specific properties
findfigs Find visible offscreen figures
gobjects Initialize array for graphics objects
isgraphics True for valid graphics object handles
ishandle Test for valid graphics or Java object handle
copyobj Copy graphics objects and their descendants
delete Delete files or objects

Graphics Object Programming

gobjects Initialize array for graphics objects


isgraphics True for valid graphics object handles
isempty Determine whether array is empty
isequal Determine array equality
isa Determine if input has specified data type
clf Clear current figure window
cla Clear axes
close Remove specified figure

Interactive Control and Callbacks

uicontextmenu Create context menu


uimenu Create menu or menu items
dragrect Drag rectangles with mouse
rbbox Create rubberband box for area selection
refresh Redraw current figure
shg Show most recent graph window

Object Containers

hggroup Create group object


hgtransform Create transform object
makehgtform Create 4-by-4 transform matrix
eye Identity matrix

Specifying Target for Graphics Output

hold Retain current plot when adding new plots


ishold Current hold state
newplot Determine where to draw graphics objects
clf Clear current figure window
cla Clear axes

Developing Chart Classes

matlab.graphics.chartcontainer.ChartContainer Base class for developing chart objects


matlab.graphics.chartcontainer.mixin.Legend
Add legend support to chart container
subclass
matlab.graphics.chartcontainer.mixin.Colorbar
Add colorbar support to chart container
subclass
setup
Set up instance of chart container
subclass
update
Update instance of chart container
subclass after setting properties
getAxes Get axes for chart container subclass
getLegend
Get legend object for legend mixin
subclass
getColorbar
Get colorbar object for colorbar mixin
subclass

Graphics Performance

drawnow Update figures and process callbacks


rendererinfo Graphics renderer information
opengl Control OpenGL rendering

Programming
Scripts

edit Edit or create file


input Request user input
publish Generate view of MATLAB file in specified format
grabcode Extract MATLAB code from file published to HTML
snapnow Take snapshot of image for inclusion in published document

Functions

Function Basics

function Declare function name, inputs, and outputs

Input and Output Arguments

nargin Number of function input arguments


nargout Number of function output arguments
varargin Variable-length input argument list
varargout Variable-length output argument list
narginchk Validate number of input arguments
nargoutchk Validate number of output arguments
validateattributes Check validity of array
validatestring Check validity of text
inputParser Input parser for functions
inputname Variable name of function input
mfilename File name of currently running code
arguments Declare function argument validation
namedargs2cell Convert structure containing name-value pairs to cell array
mustBeFinite Validate that value is finite or issue error
mustBeGreaterThan Validate that value is greater than another value or issue error
mustBeGreaterThanOrEqual
Validate that value is greater than or equal to another value or
issue error
mustBeInteger Validate that value is integer or issue error
mustBeLessThan Validate that value is less than another value or issue error
mustBeLessThanOrEqual Validate that value is less than or equal to another value or issue
error
mustBeMember Validate that value is member of specified set
mustBeNegative Validate that value is negative or issue error
mustBeNonempty Validate that value is nonempty or issue error
mustBeNonNan Validate that value is nonNaN
mustBeNonnegative Validate that value is nonnegative or issue error
mustBeNonpositive Validate that value is nonpositive or issue error
mustBeNonsparse Validate that value is nonsparse or issue error
mustBeNonzero Validate that value is nonzero or issue error
mustBeNumeric Validate that value is numeric or issue error
mustBeNumericOrLogical Validate that value is numeric or logical or issue error
mustBePositive Validate that value is positive or issue error
mustBeReal Validate that value is real or issue error

Variables

isvarname Determine if input is valid variable name


matlab.lang.makeUniqueStrings Construct unique strings from input strings
matlab.lang.makeValidName Construct valid MATLAB identifiers from input strings
namelengthmax Maximum identifier length
persistent Define persistent variable
assignin Assign value to variable in specified workspace
global Declare variables as global
mlock Prevent clearing function or script from memory
munlock Allow clearing function or script from memory
mislocked Determine if function or script is locked in memory

Error Handling

try, catchExecute statements and catch resulting errors


error Throw error and display message
warning Display warning message
lastwarn Last warning message
assert Throw error if condition false
onCleanup Cleanup tasks upon function completion

Classes

Class Syntax Guide


class Class of object
isobject Determine if input is MATLAB object
enumeration Class enumeration members and names
events Event names
methods Class method names
properties Class property names
superclasses Names of superclasses

Sample Class Implementations

classdef Class definition keywords

Class Definition

Class File Organization

classdef Class definition keywords


import Add package, class, or functions to current import list

Properties

properties Class property names


isprop True if property exists
mustBeFinite Validate that value is finite or issue error
mustBeGreaterThan Validate that value is greater than another value or issue error
mustBeGreaterThanOrEqual
Validate that value is greater than or equal to another value or
issue error
mustBeInteger Validate that value is integer or issue error
mustBeLessThan Validate that value is less than another value or issue error
mustBeLessThanOrEqual
Validate that value is less than or equal to another value or
issue error
mustBeMember Validate that value is member of specified set
mustBeNegative Validate that value is negative or issue error
mustBeNonempty Validate that value is nonempty or issue error
mustBeNonNan Validate that value is nonNaN
mustBeNonnegative Validate that value is nonnegative or issue error
mustBeNonpositive Validate that value is nonpositive or issue error
mustBeNonsparse Validate that value is nonsparse or issue error
mustBeNonzero Validate that value is nonzero or issue error
mustBeNumeric Validate that value is numeric or issue error
mustBeNumericOrLogical Validate that value is numeric or logical or issue error
mustBePositive Validate that value is positive or issue error
mustBeReal Validate that value is real or issue error
dynamicprops Superclass for classes that support dynamic properties
meta.DynamicProperty Describe dynamic property of MATLAB object
event.DynamicPropertyEvent Event data for dynamic property events
meta.property Describe property of MATLAB class
meta.Validation Describes property validation
meta.FixedDimension Fixed dimension in property size specification
meta.UnrestrictedDimension Unrestricted dimension in property size specification
meta.ArrayDimension Size information for property validation
matlab.lang.OnOffSwitchState Represent on and off states with logical values

Methods

methods Class method names


ismethod Determine if method of object
meta.method Describe method of MATLAB class

Handle Classes

isequal Determine array equality


eq Determine equality
handle Superclass of all handle classes
matlab.mixin.SetGet Provide handle classes with set and get methods
matlab.mixin.SetGetExactNames Require exact name match for set and get methods
dynamicprops Superclass for classes that support dynamic properties
matlab.mixin.Copyable Superclass providing copy functionality for handle objects
addlistener Create event listener bound to event source
listener Create event listener without binding to event source
notify Notify listeners that event is occurring
delete Delete handle object
findobj Find handle objects
findprop Find meta.property object
isvalid Determine valid handles
relationaloperators Determine equality or sort handle objects

Events

events Event names


notify Notify listeners that event is occurring
addlistener Create event listener bound to event source
listener Create event listener without binding to event source
event.hasListener Determine if listeners exist for event
event.EventData Base class for event data
event.listener Class defining listener objects
event.PropertyEvent Data for property events
event.proplistener Define listener object for property events

Class Hierarchies

Subclass Definition

superclasses Names of superclasses


matlab.mixin.Heterogeneous Superclass for heterogeneous array formation

Enumerations

enumeration Class enumeration members and names


isenum Determine if variable is enumeration
meta.EnumeratedValue Describe enumeration member of MATLAB class

Class Customization

Object Indexing

numArgumentsFromSubscript Number of arguments for customized indexing methods


subsref Subscripted reference
subsasgn Redefine subscripted assignment
subsindex Convert object to array index
substruct Create structure argument for subsasgn or subsref
builtin Execute built-in function from overloaded method

Object Arrays

empty Create empty array of specified class


matlab.mixin.Heterogeneous Superclass for heterogeneous array formation

Customize Object Display for Classes

display Show information about variable or expression result


details Display array details
matlab.mixin.CustomDisplay Interface for customizing object display
matlab.mixin.util.PropertyGroup Custom property list for object display

Object Save and Load

saveobj Modify save process for object


loadobj Customize load process for objects

Class Modifications and Updates

edit Edit or create file

Class Introspection and Metadata

metaclass Obtain meta.class object


meta.abstractDetails Find abstract methods and properties
meta.class.fromName Return meta.class object associated with named class
meta.package.fromName Return meta.package object for specified package
meta.package.getAllPackages Get all top-level packages
properties Class property names
methods Class method names
events Event names
superclasses Names of superclasses
meta.class Describe MATLAB class
meta.property Describe property of MATLAB class
meta.method Describe method of MATLAB class
meta.event Describe event of MATLAB class
meta.package Describe MATLAB package
meta.DynamicProperty Describe dynamic property of MATLAB object
meta.EnumeratedValue Describe enumeration member of MATLAB class
meta.MetaData Superclass for MATLAB object metadata
meta.ArrayDimension Size information for property validation
meta.Validation Describes property validation
meta.FixedDimension Fixed dimension in property size specification
meta.UnrestrictedDimension Unrestricted dimension in property size specification

System Objects

Use System Objects


step Run System object algorithm
clone Create duplicate System object
isDone End-of-data status
isLocked Determine if System object is in use
nargin Number of input arguments for System object
nargout Number of output arguments for System object
reset Reset internal states of System object
release
Release resources and allow changes to System object property values and input
characteristics

Create System Objects

setupImpl Initialize System object


stepImpl System output and state update equations
resetImpl Reset System object states
releaseImpl Release resources
infoImpl Information about System object
isDoneImpl End-of-data flag
isInactivePropertyImpl Status of inactive property
isTunablePropertyDataTypeMutableImpl
Set whether tunable properties can change data
type
isDiscreteStateSpecificationMutableImpl
Control whether discrete states can change data
type
processTunedPropertiesImpl Action when tunable properties change
setProperties
Set property values using name-value pairs
when creating System object
validatePropertiesImpl Validate property values of System object
getPropertyGroupsImpl Property groups for System object display
getNumInputsImpl Number of inputs to the System object
getNumOutputsImpl Number of outputs from System object
getNumInputs
Number of inputs required to call the System
object
getNumOutputs
Number of outputs from calling the System
object
isInputComplexityMutableImpl
Set whether System object input complexity
can change
isInputDataTypeMutableImpl
Set whether System object input data type can
change
isInputSizeMutableImpl
Set whether System object input size can
change
nargin Number of input arguments for System object
nargout Number of output arguments for System object
processInputSpecificationChangeImpl
Perform actions when input size, complexity, or
data type change
validateInputsImpl Validate inputs to System object
loadObjectImpl Load System object from MAT file
saveObjectImpl Save System object in MAT file
matlab.System Base class for System objects
matlab.system.mixin.FiniteSource Finite source mixin class

Files and Folders

Search Path

addpath Add folders to search path


rmpath Remove folders from search path
path View or change search path
savepath Save current search path
userpath View or change default user work folder
genpath Generate path name
pathsep Search path separator for current platform
pathtool Open Set Path dialog box to view and change search path
restoredefaultpath Restore search path to factory-installed state
rehash Refresh function and file system path caches

File Operations

dir List folder contents


ls List folder contents
pwd Identify current folder
fileattrib Set or get attributes of file or folder
exist Check existence of variable, script, function, folder, or class
isfile Determine if input is file
isfolder Determine if input is folder
type Display contents of file
visdiff Compare two files or folders
what List MATLAB files in folder
which Locate functions and files
cd Change current folder
copyfile Copy file or folder
delete Delete files or objects
recycle Set option to move deleted files to recycle folder
mkdir Make new folder
movefile Move or rename file or folder
rmdir Remove folder
open Open file in appropriate application
winopen Open file in appropriate application (Windows)

File Compression

zip Compress files into zip file


unzip Extract contents of zip file
gzip Compress files into GNU zip files
gunzip Extract contents of GNU zip file
tar Compress files into tar file
untar Extract contents of tar file

File Name Construction

fileparts Get parts of file name


fullfile Build full file name from parts
filemarker Character to separate file name from local or nested function name
filesep File separator for current platform
tempdir Name of temporary folder for the system
tempname Unique name for temporary file
matlabroot MATLAB root folder
toolboxdir Root folder for specified toolbox

Programming Utilities

eval
Execute MATLAB
expression in text
evalc
Evaluate MATLAB
expression with capture
Execute MATLAB
evalin expression in specified
workspace
feval Evaluate function
run Run MATLAB script
Execute built-in
builtin function from
overloaded method
Create content-
pcode obscured, executable
files
Create object to
timer schedule execution of
MATLAB commands
delete
Remove timer object
from memory
get
Query property values
for timer object
isvalid
Determine timer object
validity
set
Set property values for
timer object
start Start timer object
startat
Schedule timer to fire at
specified time
stop Stop timer object
timerfind Find timer object
timerfindall
Find timer object,
regardless of visibility
Block command prompt
wait until timer stops
running
try, catch
Execute statements and
catch resulting errors
MException
Capture error
information
addCause
Record additional
causes of exception
addCorrection
Provide suggested fix
for exception
getReport
Get error message for
exception
MException.last
Return last uncaught
exception
rethrow
Rethrow previously
caught exception
throw Throw exception
Throw exception as if
throwAsCaller occurs within calling
function
Correct error by
matlab.lang.correction.AppendArgumentsCorrection appending missing
input arguments
Correct error by
matlab.lang.correction.ConvertToFunctionNotationCorrection converting to function
notation
Correct error by
matlab.lang.correction.ReplaceIdentifierCorrection replacing identifier in
function call

App Building
App Designer

Designing Apps in App Designer

appdesigner Open App Designer Start Page or existing app file


uiaxes Create UI axes for plots in App Designer
uibutton Create push button or state button component
uibuttongroup Create button group to manage radio buttons and toggle buttons
uicheckbox Create check box component
uidatepicker Create date picker component
uidropdown Create drop-down component
uieditfield Create text or numeric edit field component
uihtml Create HTML UI component
uiimage Create image component
uilabel Create label component
uilistbox Create list box component
uimenu Create menu or menu items
uiradiobutton Create radio button component
uislider Create slider component
uispinner Create spinner component
uitable Create table user interface component
uitextarea Create text area component
uitogglebutton Create toggle button component
uitree Create tree component
uitreenode Create tree node component
uifigure Create figure for designing apps in App Designer
uipanel Create panel container object
uitabgroup Create container for tabbed panels
uitab Create tabbed panel
uigridlayout Create grid layout manager
uigauge Create gauge component
uiknob Create knob component
uilamp Create lamp component
uiswitch Create slider switch, rocker switch, or toggle switch component
expand Expand tree node
collapse Collapse tree node
move Move tree node
scroll Scroll to location within container, list box, or tree
uistyle Create style for table UI component
addStyle Add style to table UI component
removeStyle Remove style from table UI component
uialert Display alert dialog box
uiconfirm Create confirmation dialog box
uiprogressdlg Create progress dialog box
uisetcolor Open color picker
uigetfile Open file selection dialog box
uiputfile Open dialog box for saving files
uigetdir Open folder selection dialog box
uiopen Open file selection dialog box and load selected file into workspace
uisave Open dialog box for saving variables to MAT-file

GUIDE or Programmatic Workflow

Designing Apps

figure Create figure window


axes Create Cartesian axes
uicontrol Create user interface control
uitable Create table user interface component
uipanel Create panel container object
uibuttongroup Create button group to manage radio buttons and toggle buttons
uitab Create tabbed panel
uitabgroup Create container for tabbed panels
uimenu Create menu or menu items
uicontextmenu Create context menu
uitoolbar Create toolbar on figure
uipushtool Create push button on toolbar
uitoggletool Create toggle button on toolbar
align Align UI components and graphics objects
movegui Move figure to specified location on screen
getpixelposition Get component position in pixels
setpixelposition Set component position in pixels
listfonts List available system fonts
textwrap Wrap text for user interface control
uistack Reorder visual stacking of UI components

Dialog Boxes

errordlg Create error dialog box


warndlg Create warning dialog box
msgbox Create message dialog box
helpdlg Create help dialog box
waitbar Create or update wait bar dialog box
questdlg Create question dialog box
inputdlg Create dialog box to gather user input
listdlg Create list selection dialog box
uisetcolor Open color picker
uisetfont Open font selection dialog box
export2wsdlg Create dialog box for exporting variables to workspace
uigetfile Open file selection dialog box
uiputfile Open dialog box for saving files
uigetdir Open folder selection dialog box
uiopen Open file selection dialog box and load selected file into workspace
uisave Open dialog box for saving variables to MAT-file
printdlg Open figure Print dialog box
printpreview Open figure Print Preview dialog box
exportsetupdlg Open figure Export Setup dialog box
dialog Create empty modal dialog box
uigetpref Create dialog box that opens according to user preference

Programming Apps

uiwait Block program execution and wait to resume


uiresume Resume execution of blocked program
waitfor Block execution and wait for condition
waitforbuttonpress Wait for click or key press
closereq Default figure close request function
getappdata Retrieve application-defined data
setappdata Store application-defined data
isappdata True if application-defined data exists
rmappdata Remove application-defined data
guidata Store or retrieve UI data
guihandles Create structure containing all child objects of Figure
uisetpref Manage preferences used in uigetpref
guide (To be removed) Create or edit UI file in GUIDE

Package and Share Apps

matlab.apputil.create
Create or modify app project file for packaging app
into .mlappinstall file using interactive dialog box
matlab.apputil.package Package app files into .mlappinstall file
matlab.apputil.install Install app from a .mlappinstall file
matlab.apputil.run Run app programmatically
matlab.apputil.getInstalledAppInfo List installed app information
matlab.apputil.uninstall Uninstall app

Software Development Tools


Debugging and Analysis

dbclear Remove breakpoints


dbcont Resume execution
dbdown Reverse dbup workspace shift
dbquit Quit debug mode
dbstack Function call stack
dbstatus List all breakpoints
dbstep Execute next executable line from current breakpoint
dbstop Set breakpoints for debugging
dbtype Display file with line numbers
dbup Shift current workspace to workspace of caller in debug mode
keyboard Give control to keyboard
echo Display statements during function execution
checkcode Check MATLAB code files for possible problems
mlintrpt Run checkcode for file or folder
codeCompatibilityReport Create code compatibility report
analyzeCodeCompatibility Create code compatibility analysis results

Performance and Memory

timeit Measure time required to run function


tic Start stopwatch timer
toc Read elapsed time from stopwatch
cputime Elapsed CPU time
profile Profile execution time for functions
bench MATLAB benchmark
memory Display memory information
inmem Names of functions, MEX-files, classes in memory
pack Consolidate workspace memory
memoize Add memoization semantics to function handle
MemoizedFunction Call memoized function and cache results
clearAllMemoizedCaches Clear caches for all MemoizedFunction objects

Projects

currentProject Get current project


openProject Load an existing project
isLoaded Determine if project is loaded
reload Reload project
close Close project
export Export project to archive
matlab.project.createProject Create blank project
matlab.project.deleteProject Stop folder management and delete project definition files
matlab.project.loadProject Load project
matlab.project.rootProject Get root project
addFile Add file or folder to project
addFolderIncludingChildFiles Add folder and child files to project
removeFile Remove file from project
addPath Add folder to project path
removePath Remove folder from project path
addReference Add referenced project to project
removeReference Remove project reference
addStartupFile Add startup file to project
addShutdownFile Add shutdown file to project
removeStartupFile Remove startup file from project startup list
removeShutdownFile Remove shutdown file from project shutdown list
addShortcut Add shortcut to project
removeShortcut Remove shortcut from project
addLabel Attach label to project file
createLabel Create project label
removeLabel Remove label from project
findLabel Get project file label
createCategory Create category of project labels
findCategory Find project category of labels
removeCategory Remove project category of labels
findFile Find project file by name
listModifiedFiles List modified files in project
listRequiredFiles Get project file dependencies
refreshSourceControl Update source control status of project files
updateDependencies Update project dependencies
matlab.project.Project Project object

Testing Frameworks

Script-Based Unit Tests

assert Throw error if condition false


runtests Run set of tests
testsuite Create suite of tests
TestResult Result of running test suite

Function-Based Unit Tests

functiontests Create array of tests from handles to local functions


runtests Run set of tests
testsuite Create suite of tests
run Run TestSuite array using TestRunner object configured for text output
Test Specification of single test method
FunctionTestCase TestCase used for function-based tests
TestResult Result of running test suite
Class-Based Unit Tests

runtests Run set of tests


testsuite Create suite of tests
run
Run TestSuite array using TestRunner object configured for
text output
run Run all tests in TestSuite array
matlab.unittest.TestCase Superclass of all matlab.unittest test classes
matlab.unittest.TestSuite Class for grouping tests to run
matlab.unittest.Test Specification of single test method
matlab.unittest.TestRunner Class for running tests in matlab.unittest framework
matlab.unittest.TestResult Result of running test suite

Extend Unit Testing Framework

matlab.unittest.constraints.Constraint
Fundamental interface class for
comparisons
matlab.unittest.constraints.BooleanConstraint
Interface class for Boolean
combinations of constraints
matlab.unittest.constraints.Tolerance
Abstract interface class for
tolerances
matlab.unittest.fixtures.Fixture Interface class for test fixtures
matlab.unittest.diagnostics.Diagnostic
Fundamental interface class for
matlab.unittest diagnostics
matlab.unittest.diagnostics.ConstraintDiagnostic
Diagnostic with fields common to
most constraints
matlab.unittest.plugins.TestRunnerPlugin
Plugin interface for extending
TestRunner
matlab.unittest.plugins.Parallelizable
Interface for plugins that support
running tests in parallel
matlab.unittest.plugins.QualifyingPlugin
Interface for plugins that perform
system-wide qualifications
matlab.unittest.plugins.OutputStream
Interface that determines where to
send text output
matlab.test.behavior.Missing
Test if class satisfies contract for
missing values

App Testing Framework

press Perform press gesture on UI component


choose Perform choose gesture on UI component
drag Perform drag gesture on UI component
type Type in UI component
hover Perform hover gesture on UI component
matlab.uitest.unlock
Unlock figure locked by app testing
framework
matlab.uitest.TestCase.forInteractiveUse Create a TestCase object for interactive use

matlab.uitest.TestCase
TestCase to write tests with app testing
framework

Performance Testing Framework

runperf
Run set of tests for
performance measurement
testsuite Create suite of tests
Interface for measuring
matlab.perftest.TimeExperiment execution time of code under
test
matlab.perftest.FixedTimeExperiment
TimeExperiment that collects
fixed number of measurements
TimeExperiment that collects
matlab.perftest.FrequentistTimeExperiment variable number of
measurements
matlab.perftest.TestCase
Superclass of matlab.perftest
performance test classes
matlab.perftest.TimeResult
Result from running time
experiment
matlab.unittest.measurement.DefaultMeasurementResult
Default implementation of
MeasurementResult class
matlab.unittest.measurement.MeasurementResult
Base class for classes holding
measurement results
matlab.unittest.measurement.chart.ComparisonPlot
Visually compare two sets of
time experiment results

Mocking Framework

matlab.mock.TestCase TestCase to write tests with mocking framework


matlab.mock.AnyArguments Match any number of arguments
matlab.mock.actions.AssignOutputs
Define return values for method called or
property accessed
matlab.mock.actions.Invoke Invoke function handle when method is called
matlab.mock.actions.ReturnStoredValue Return stored property value
matlab.mock.actions.StoreValue Store property value
matlab.mock.actions.ThrowException
Throw exception when method is called or when
property is set or accessed
matlab.mock.constraints.Occurred Constraint qualifying mock object interactions
matlab.mock.constraints.WasAccessed Constraint determining property get access
matlab.mock.constraints.WasCalled Constraint determining method call
matlab.mock.constraints.WasSet Constraint determining property set interaction
matlab.mock.MethodCallBehavior
Specify mock object method behavior and
qualify method calls
matlab.mock.PropertyBehavior
Specify mock object property behavior and
qualify interactions
matlab.mock.PropertyGetBehavior Specify mock property get behavior
matlab.mock.PropertySetBehavior Specify mock object set behavior
getMockHistory Return history from mock object
matlab.mock.InteractionHistory.forMock Return history from mock object
matlab.mock.InteractionHistory Interface for mock object interaction history

Toolbox Distribution

matlab.addons.toolbox.packageToolbox Package toolbox project


matlab.addons.toolbox.toolboxVersion Query or modify version of toolbox
matlab.addons.toolbox.installToolbox Install toolbox file
matlab.addons.toolbox.uninstallToolbox Uninstall toolbox
matlab.addons.toolbox.installedToolboxes
Return information about installed
toolboxes
builddocsearchdb
Build searchable documentation
database
validateFunctionSignaturesJSON
Validate functionSignatures.json
files
matlab.codetools.requiredFilesAndProducts
List dependencies of MATLAB
program files
matlab.settings.FactoryGroup.createToolboxGroup
Create FactoryGroup root object for
toolbox
addGroup Add new factory settings group
addSetting Add new factory setting
matlab.settings.mustBeLogicalScalar
Validate that setting value is logical
array with one element
matlab.settings.mustBeNumericScalar
Validate that setting value is
numeric array with one element
matlab.settings.mustBeStringScalar Validate that setting value is string
array with one element
matlab.settings.mustBeIntegerScalar
Validate that setting value is integer
array with one element
SettingsFileUpgrader Settings file upgrader object
move
Record move or rename of factory
setting or group
remove
Record removal of factory setting or
group
matlab.settings.reloadFactoryFile Load or reload factory settings
Get results of upgrading personal
matlab.settings.loadSettingsCompatibilityResults settings of toolbox for specific
version
FactoryGroup
Group of factory settings and
factory subgroup objects
FactorySetting Factory settings object
ReleaseCompatibilityResults Release compatibility results object
ReleaseCompatibilityException
Release compatibility exception
object
VersionResults Version results object
OperationResult Operation result object

External Language Interfaces


C++ Libraries

Publish MATLAB Interface to C++ Library

clibgen.generateLibraryDefinition Create definition file for C++ library


clibgen.buildInterface Create interface to C++ library without definition file

Call C++ Functions from Published MATLAB Interface

clibIsNull Determine if C++ object is null


clibIsReadOnly Determine if C++ object is read-only
clibRelease Release C++ object from MATLAB
underlyingValue Underlying numeric value for C++ enumeration object created in MATLAB

C Libraries

loadlibrary Load C shared library into MATLAB


unloadlibrary Unload shared C library from memory
calllib Call function in C shared library
libfunctions Return information on functions in shared C library
libfunctionsview Display shared C library function signatures in window
libisloaded Determine if shared C library is loaded
libpointer Pointer object for use with shared C library
libstruct
Convert MATLAB structure to C-style structure for use with shared C
library
lib.pointer Pointer object compatible with C pointer

MEX File Functions

mexext Binary MEX file-name extension

Java Libraries

isjava Determine if input is Java object


javaaddpath Add entries to dynamic Java class path
javaArray Construct Java array object
javachk Error message based on Java feature support
javaclasspath Return Java class path or specify dynamic path
javaMethod Call Java method
javaMethodEDT Call Java method from Event Dispatch Thread (EDT)
javaObject Call Java constructor
javaObjectEDT Call Java constructor on Event Dispatch Thread (EDT)
javarmpath Remove entries from dynamic Java class path
usejava Determine if Java feature is available
matlab.exception.JavaException Capture error information for Java exception

Python Libraries

Call Python Library Functions

pyenv Change default environment of Python interpreter


PythonEnvironment Python environment information
matlab.exception.PyException Capture error information for Python exception

Python Functions in MATLAB

pyargs Create keyword arguments for Python function


.NET Libraries

Getting Started with Microsoft .NET

NET.addAssembly Make .NET assembly visible to MATLAB


NET.isNETSupported Check for supported Microsoft .NET Framework
NET Summary of functions in MATLAB .NET interface
enableNETfromNetworkDrive Enable access to .NET commands from network drive
NET.Assembly Members of .NET assembly
NET.NetException Capture error information for .NET exception

.NET Data Types in MATLAB

NET.createArray Array for nonprimitive .NET types


NET.disableAutoRelease
Lock .NET object representing a RunTime Callable Wrapper (COM
Wrapper) so that MATLAB does not release COM object
NET.enableAutoRelease
Unlock .NET object representing a RunTime Callable Wrapper
(COM Wrapper) so that MATLAB releases COM object

.NET Properties in MATLAB

NET.setStaticProperty Static property or field name

.NET Events and Delegates in MATLAB

BeginInvoke Initiate asynchronous .NET delegate call


EndInvoke
Retrieve result of asynchronous call initiated by .NET System.Delegate
BeginInvoke method
Combine Convenience function for static .NET System.Delegate Combine method
Remove Convenience function for static .NET System.Delegate Remove method
RemoveAll Convenience function for static .NET System.Delegate RemoveAll method

.NET Enumerations in MATLAB

bitnot .NET enumeration object bit-wise NOT instance method

.NET Generic Classes in MATLAB

NET.convertArray Convert numeric MATLAB array to .NET array


NET.createGeneric Create instance of specialized .NET generic type
NET.invokeGenericMethod Invoke generic method of object
NET.GenericClass Represent parameterized generic type definitions

COM Objects

actxserver Create COM server


methodsview View class methods
eventlisteners List event handler functions associated with COM object events
registerevent Associate event handler for COM object event at run time
unregisterallevents Unregister all event handlers associated with COM object events
unregisterevent Unregister event handler associated with COM object event at run time
iscom Determine whether input is COM object
isevent Determine whether input is COM object event
isinterface Determine whether input is COM interface
COM Access COM components from MATLAB

HTTP Interface

matlab.net.http.RequestMessage HTTP request message


matlab.net.http.ResponseMessage HTTP response message
matlab.net.http.Message HTTP request or response message
matlab.net.http.MessageType HTTP message type
matlab.net.http.MessageBody Body of HTTP message
matlab.net.http.ProtocolVersion HTTP protocol version
matlab.net.http.RequestLine First line of HTTP request message
matlab.net.http.RequestMethod HTTP request method
matlab.net.http.StartLine First line of HTTP message
matlab.net.http.StatusClass Status class of HTTP response
matlab.net.http.StatusCode Status code in HTTP response
matlab.net.http.StatusLine First line of HTTP response message
matlab.net.http.HeaderField Header field of HTTP message
matlab.net.http.field.AcceptField HTTP Accept header field
matlab.net.http.field.AuthenticateField
HTTP WWW-Authenticate or Proxy-
Authenticate header field
matlab.net.http.field.AuthenticationInfoField
HTTP Authentication-Info header
field in response message
matlab.net.http.field.AuthorizationField
HTTP Authorization or Proxy-
Authorization header field
matlab.net.http.field.ContentDispositionField
HTTP Content-Disposition header
field
matlab.net.http.field.ContentLengthField HTTP Content-Length field
matlab.net.http.field.ContentLocationField HTTP Content-Location header field
matlab.net.http.field.ContentTypeField HTTP Content-Type header field
matlab.net.http.field.CookieField HTTP Cookie header field
matlab.net.http.field.DateField HTTP Date header field
matlab.net.http.field.GenericField
HTTP header field with any name
and value
matlab.net.http.field.GenericParameterizedField
GenericField to support
parameterized syntax
matlab.net.http.field.HTTPDateField HTTP header field containing date
matlab.net.http.field.IntegerField
Base class for HTTP header fields
containing nonnegative integers
matlab.net.http.field.LocationField HTTP Location header field
matlab.net.http.field.MediaRangeField
Base class for HTTP Content-Type
and Accept header fields
matlab.net.http.field.SetCookieField HTTP Set-Cookie header field
matlab.net.http.field.URIReferenceField
Base class for HTTP header fields
containing URI components
matlab.net.http.io.ContentConsumer
Consumer for HTTP message
payloads
matlab.net.http.io.FileConsumer
Consumer for files in HTTP
messages
matlab.net.http.io.StringConsumer String consumer for HTTP payloads
matlab.net.http.io.JSONConsumer
Content consumer that converts
JSON input into MATLAB data
matlab.net.http.io.ImageConsumer
Consumer for image data in HTTP
payloads
matlab.net.http.io.MultipartConsumer
Helper for multipart content types in
HTTP messages
matlab.net.http.io.BinaryConsumer
Consumer for binary data in HTTP
messages
matlab.net.http.io.GenericConsumer
Consumer for multiple content types
in HTTP messages
matlab.net.http.io.ContentProvider
ContentProvider for HTTP message
payloads
matlab.net.http.io.FileProvider ContentProvider to send files
matlab.net.http.io.FormProvider ContentProvider that sends form data
matlab.net.http.io.MultipartFormProvider
ContentProvider to send
multipart/form-data messages
matlab.net.http.io.StringProvider
ContentProvider to send MATLAB
strings
matlab.net.http.io.JSONProvider
ContentProvider to send MATLAB
data as JSON string
matlab.net.http.io.ImageProvider
ContentProvider to send MATLAB
image data
matlab.net.http.io.MultipartProvider
ContentProvider to send
multipart/mixed HTTP messages
matlab.net.http.io.GenericProvider
Generic ContentProvider for HTTP
payloads
matlab.net.http.AuthenticationScheme HTTP Authentication scheme
matlab.net.http.AuthInfo
Authentication or authorization
information in HTTP messages
matlab.net.http.Cookie HTTP cookie received from server
matlab.net.http.CookieInfo HTTP cookie information
matlab.net.http.Credentials
Credentials for authenticating HTTP
requests
matlab.net.http.Disposition Results in HTTP log record
matlab.net.http.HTTPException Exception thrown by HTTP services
matlab.net.http.HTTPOptions
Options controlling HTTP message
exchange
matlab.net.http.LogRecord HTTP history log record
matlab.net.http.MediaType
Internet media type used in HTTP
headers
matlab.net.http.ProgressMonitor
Progress monitor for HTTP message
exchange
matlab.net.URI Uniform resource identifier (URI)
matlab.net.ArrayFormat Convert arrays in HTTP queries
matlab.net.QueryParameter
Parameter in query portion of
uniform resource identifier (URI)
matlab.net.base64decode Base 64 decoding of string
matlab.net.base64encode
Base 64 encoding of byte string or
vector

WSDL (Web Services Description Language)

matlab.wsdl.createWSDLClientCreate interface to SOAP-based web service


matlab.wsdl.setWSDLToolPath Location of WSDL tools

Calling MATLAB from C++

MATLAB Engine API for C++


matlab.engine.shareEngine Convert running MATLAB session to shared session

C++ MEX Applications

mexhost Create host process for C++ MEX function


feval Evaluate C++ MEX function in MEX host process
matlab.mex.MexHost Out-of-process host for C++ MEX function execution

Calling MATLAB from Java

matlab.engine.shareEngine
Convert running MATLAB session to shared
session
matlab.engine.engineName Return name of shared MATLAB session
matlab.engine.isEngineShared Determine if MATLAB session is shared
com.mathworks.engine.MatlabEngine
Java class using MATLAB as a computational
engine
com.mathworks.matlab.types.Complex
Java class to pass complex data to and from
MATLAB
com.mathworks.matlab.types.Struct
Java class to pass MATLAB struct to and from
MATLAB
com.mathworks.matlab.types.CellStr
Java class to represent MATLAB cell array of
char vectors
com.mathworks.matlab.types.HandleObject
Java class to represent MATLAB handle
objects

Calling MATLAB from Python

matlab.engine.start_matlab Start MATLAB Engine for Python


matlab.engine.find_matlab
Find shared MATLAB sessions to connect to MATLAB
Engine for Python
matlab.engine.connect_matlab
Connect shared MATLAB session to MATLAB Engine for
Python
matlab.engine.shareEngine Convert running MATLAB session to shared session
matlab.engine.engineName Return name of shared MATLAB session
matlab.engine.isEngineShared Determine if MATLAB session is shared

matlab.engine.MatlabEngine
Python object using MATLAB as computational engine
within Python session
matlab.engine.FutureResult
Results of asynchronous call to MATLAB function stored in
Python object

Calling MATLAB from C


C MEX File Applications

mex Build MEX function or engine application


dbmex Enable MEX-file debugging on UNIX platforms

Calling MATLAB as COM Automation Server

regmatlabserver Register current MATLAB as Automation server


enableservice Enable, disable, or report status of MATLAB Automation server
actxGetRunningServer Handle to running instance of MATLAB Automation server
Execute Execute MATLAB command in Automation server
Feval Execute MATLAB function in Automation server
GetFullMatrix Matrix from Automation server workspace
PutFullMatrix Matrix in Automation server workspace
GetCharArray Character array from Automation server
PutCharArray Character array in Automation server
GetVariable Data from variable in Automation server workspace
GetWorkspaceData Data from Automation server workspace
PutWorkspaceData Data in Automation server workspace
MaximizeCommandWindow Open Automation server window
MinimizeCommandWindow Minimize size of Automation server window
Quit Terminate MATLAB Automation server

Environment and Settings


Startup and Shutdown

matlab (Windows) Start MATLAB program from Windows system prompt


matlab (macOS) Start MATLAB program from macOS Terminal
matlab (Linux) Start MATLAB program from Linux system prompt
batchStartupOptionUsed Determine if MATLAB started with -batch option
quit Terminate MATLAB program
exit Terminate MATLAB program (same as quit)
startup User-defined startup script for MATLAB
finish User-defined termination script for MATLAB
matlabrc System administrator-defined start up script for MATLAB

Basic Settings
prefdir Folder containing preferences, settings, history, and layout files
preferences Open Preferences dialog box

Platform and License

version Version number for MATLAB and libraries


ver Version information for MathWorks products
verLessThan Compare toolbox version to specified character vector
license Get license number or perform licensing task
ispc Determine if version is for Windows (PC) platform
ismac Determine if version is for macOS platform
isunix Determine if version is for Linux or Mac platforms
isstudent Determine if version is Student Version
javachk Error message based on Java feature support
usejava Determine if Java feature is available

System Commands

clipboard Copy and paste text to and from system clipboard


computer
Information about computer on which MATLAB is
running
system
Execute operating system command and return
output
dos Execute DOS command and return output
unix Execute UNIX command and return output
getenv Environment variable
setenv Set environment variable
perl Call Perl script using operating system executable
winqueryreg Item from Windows registry
matlab.io.saveVariablesToScript Save workspace variables to MATLAB script
getpref Get custom preference value
setpref Set custom preference value
addpref Add custom preference
rmpref Remove custom preference
ispref Determine if custom preference exists
matlab.addons.installedAddons Get list of installed add-ons
matlab.addons.isAddonEnabled Determine if add-on is enabled
matlab.addons.enableAddon Enable installed add-on
matlab.addons.disableAddon Disable installed add-on
matlab.addons.install Install add-on
matlab.addons.uninstall Uninstall add-on
settings Access the SettingsGroup root object
clearTemporaryValue Clear the temporary value for a setting
clearPersonalValue Clear the personal value for a setting
hasTemporaryValue
Determine whether the setting has a temporary value
set
hasPersonalValue
Determine whether the setting has a personal value
set
hasFactoryValue Determine whether the setting has a factory value set
addSetting Add new setting
addGroup Add new settings group
hasGroup Determine if settings group exists
hasSetting Determine if setting exists in settings group
removeGroup Remove settings group
removeSetting Remove setting
matlab.settings.mustBeLogicalScalar
Validate that setting value is logical array with one
element
matlab.settings.mustBeNumericScalar
Validate that setting value is numeric array with one
element
matlab.settings.mustBeStringScalar
Validate that setting value is string array with one
element
matlab.settings.mustBeIntegerScalar
Validate that setting value is integer array with one
element
Setting Setting object
SettingsGroup Group of settings and subgroup objects

Help and Support

doc Reference page in Help browser


help Help for functions in Command Window
docsearch Help browser search
lookfor Search for keyword in all help entries
demo Access product examples in Help browser
echodemo Run example script step-by-step in Command Window

MATLAB Documentation

 Functions
 Release Notes
 PDF Documentation
Support

 MATLAB Answers
 Installation Help
 Bug Reports
 Product Requirements
 Software Downloads

Introducing Deep Learning with MATLAB

Download ebook
The Matrix Reference Manual

Copyright © 1998-2019 Mike Brookes, Imperial College, London, UK


Permission is granted to copy, distribute and/or modify this document under the terms of the
GNU Free Documentation License, Version 1.2 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU Free Documentation
License".

To cite this manual use: Brookes, M., "The Matrix Reference Manual", [online]
http://www.ee.imperial.ac.uk/hp/staff/dmb/matrix/intro.html, 2011

Introduction
This manual contains reference information about linear algebra and the properties of real and
complex matrices. The manual is divided into the following sections:

 Main Index: Alphabetical index of all entries.


 Properties : Properties and numbers associated with a matrix such as determinant, rank,
inverse, …
 Eigenvalues : Theorems and matrix properties relating to eigenvalues and eigenvectors.
 Special : Properties of matrices that have a special form or structure such as diagonal,
traingular, toeplitz, …
 Relations : Relations between matrices such as equivalence, congruence, …
 Decompositions : Decomposing matrices as sums or products of simpler forms.
 Identities : Useful equations relating matrices.
 Equations : Solutions of matrix equations
 Calculus : Differentiating expressions involving matrices whose elements are functions of
an independent variable.
 Stochastic : Statistical properties of vectors and matrices whose elements are random
numbers.
 Signals : Properties of observation vectors and covariance matrices from stochastic and
deterministic signals.
 Examples: 2#2 : Examples of 2#2 matrixes with graphical illustration of their properties.
 Formal Algebra : Formal definitions of algebraic constructs such as groups, fields, vector
spaces, …
 GNU Free Documentation License

Format of Manual Entries


The general format of each entry is as follows:

1. Definition of the term


2. Outline of why it is important
3. Geometric Interpretation
The geometric interpretation of a matrix property or theorem is generally described for 2
or 3 dimensions. Words prefixed by + should be altered appropriately for other
dimensions. Thus the word +area should be replaced by volume for 3-D spaces and by
hyper-volume for larger spaces.
4. List of properties and theorems:
o Theorems apply to real matrices or complex matrices of arbitrary shape unless
explicitly stated.
 Most but not all theorems are also true for matrices whose elements are
from other fields; in particular fields with characteristic 2 cause many
properties to fail because x = -x does not imply x = 0.
o Matrix dimensions are assumed to allow the sums and products in a theorem.
o If a theorem explicitly involves inv(A) or division by A, then A is assumed to be
non-singular.
o If all matrices, vectors and scalars in a theorem are of a particular form, the
theorem is prefaced thus: [Real] or [Complex n#n].
o If some matrices are of a particular form, the theorem is prefaced thus: [A,B:n#n,
A:symmetric].
o denotes a hypertext link to a proof.
o denotes a hypertext link to an example.
5. Links to related topics

Notation
The notation is based on the MATLAB software package; differences are notes below. All
vectors are column vectors unless explicitly written as transposed.

 Matrices are represented as bold upper case (A), column vectors as bold lower case (a)
and real or complex scalars as italic lower case (a).
 The matrix A[2#3] has 2 rows and 3 columns while the column vector a[4] has 4 elements.
 A matrix can be specified explicitly by listing its elements and using a semicolon to
separate each row. Thus [1 2 3; 4 5 6] is a matrix with 2 rows and 3 columns. This
notation can be used to compose large matrices from smaller ones: [A B;C D]. Each row
must have the same total number of columns and each matrix within a row must have the
same number of rows.
 Operators
o Operator Precedence:
 (1) Superscripts, powers and : suffix
 (2) scalar and matrix multiplication/division
 (3) ⊗ (Kroneker product)
 (4) • ÷ (elementwise multiplication/division)
 (5) Addition/Subtraction
o A • B, A ÷ B and A•n denote element-by-element multiplication, division and
raising to a power
o A ⊗ B = KRON(A,B) is the Kronecker product of A and B. If A is m#n and B is
p#q then A ⊗ B is mp#nq and equals the block matrix [a(1,1)B ... a(1,n)B ; ... ;
a(m,1)B ... a(m,n)B].
o A ⊕ B = DIAG(A,B) is the direct sum of A and B. If A is m#n and B is p#q then
A ⊕ B is m+p#n+q.
o A: (also written vec(A) ) denotes the large column vector formed by
concatenating all the columns of A. If A is m#n, then A: = [a1,1 a2,1 … am,1 a1,2 a2,2
… am,n]T.
o The following superscripts are used:
 AC denotes the complex conjugate of A.
 AH denotes the conjugate transpose of A. If A is real then AH = AT.
 AR and AI are the real and imaginary parts of A = AR + j AI .
 AT denotes the transpose of A.
 A-1, A# and A+ denote respectively the inverse, generalized inverse and
pseudoinverse of A.
 A-T=(AT)-1=(A-1)T denotes the inverse of the transpose
 A-H=(AH)-1=(A-1)H denotes the inverse of the conjugate transpose
 For real matrices only, A>B means that each element of A is greater than the
corresponding element of B. Similar definitions apply to <, >= and <=.
 |A| and ||A||F denote the determinant and Frobenius norm of A.
 ||a|| denotes the euclidean norm of a
 |a| denotes the absolute value of a
 δi,j , the Kronecker delta function, equals 1 if i=j and equals 0 if i≠j

Subscripts

 aij or ai,j denotes the element of matrix A in row i of column j. Row and column indices
begin at 1.
 A2:5,6:7 denotes the 4#2 submatrix of A consisting of row 2,3,4,5 and columns 6 and 7.
 aj denotes the j'th column of matrix A.
 AX,Y defines a matrix of the same size as X and Y (which must be the same size).
Subscripts are taken from corresponding positions in X and Y. [Different from MATLAB]

Special Matrices

 The dimensions of the following special matrices are normally deduced from context but
are occasionally specified explicitly (e.g. 0[m#n]):
o The matrix or vector 0 consists entirely of zeros.
o The matrix or vector 1 consists entirely of ones.
o The matrix I denotes the square identity matrix with 1's down the main diagonal
and 0's elsewhere.
 ei is the ith column of I.
o The matrix J denotes the square exchange matrix with 1's along the main anti-
diagonal and 0's elsewhere.
 m:n denotes a column vector of length |1+n-m| whose elements go from m to n in steps of
+1 or -1 according to whether m<n or m>n. [Different from MATLAB]

Functions

Several of the functions listed below have different meanings according to whether their
argument is a scalar, vector or matrix. The form of the result is indicated by the function's
typeface.

 ABS(A) and abs(a) involves taking the absolute value of each matrix or vector element.
 ADJ(A) is the adjoint of the square matrix A.
 CHOOSE(n,r) is a matrix with n!/(r! (n-r)!) rows, each a different choice of r numbers
out of the numbers 1:n. Each row is listed in ascending order.
 CONJ(A), also written AC, is the complex conjugate of A.
 conv(a[m],b[n])[m+n-1] is the convolution of a and b, i.e. a vector whose i'th element is the
sum of a(j)b(i-j+1) where j goes from 1 to i.
 det(A), also written |A|, is the determinant of the square matrix A.
 diag(A) is the vector consisting of the diagonal elements of A.
 DIAG(a) is the diagonal matrix whose diagonal elements are the elements of a.
 DIAG(A,B,C), also written A ⊕ B ⊕ C, denotes the matrix [A 0 0; 0 B 0; 0 0 C]
 eig(A) is a vector containing the eigenvalues of A. If A is Hermitian, they are sorted into
descending order.
 floor(x) is the most positive integer <= x
 INV(A) or A-1 is the inverse of A.
 KRON(A,B) = A ⊗ B is the Kronecker product of A and B. If A is m#n and B is p#q
then A ⊗ B is mp#nq and equals the block matrix [a(1,1)B ... a(1,n)B ; ... ; a(m,1)B ...
a(m,n)B].
 max(a | "condition") is the maximum of a subject to (an optional) "condition".
 min(a | "condition") is the minimum of a subject to (an optional) "condition".
 PERM(n) is a matrix with n! rows, each a different permutation of the numbers 1:n.
 pet(A) is the permanent of A.
 prod(a) is the product of the elements of a.
 prod() is the vector formed by multiplying together the elements of each row of A.
[Different from MATLAB].
 rho(A) is the spectral radius of A.
 rows(A) is the number of rows in the matrix A.
 tr(A) is the trace of A.
 rank(A) is the dimension of the subspace spanned by the columns of A.
 sgn(a) equals +1 or -1 according to the sign of a or 0 if a=0.
 sgn(a) equals +1 or -1 according to the signature of the permutation needed to sort the
elements of a into ascending order.
 sgn(A) is a vector giving the permutation signatures of each row of A. Each entry equals
+1 or -1.
 SKEW(a) is the 3#3 skew-symmetric matrix [0 -a3 a2; a3 0 -a1; -a2 a1 0] where a is a 3-
element vector. The vector cross product is given by a × b = SKEW(a) b = -SKEW(b) a.
[See skew-symmetric for more properties of SKEW()].
 sum(a) is the sum of the elements of a.
 sum(A) is the vector formed by summing the rows of A. [Different from MATLAB].
 sum(A) is the scalar formed by summing all the elements of A. [Different from
MATLAB].
 TOE(a[m+n-1])[m#n] is the m#n matrix with constant diagonals whose i,jth element is ai-j+n.
 TVEC(m,n) is an orthogonal mn#mn permutation matrix whose i,jth element is 1 if
j=1+m(i-1)-(mn-1)floor((i-1)/n) or 0 otherwise [see vectorized transpose].
 vec(A), also written A:, denotes the large column vector formed by concatenating all the
columns of A. If A is m#n, then A: = [a1,1 a2,1 … am,1 a1,2 a2,2 … am,n]T.

Other Web Sites


 Linear Algebra Glossary by John Burkardt [R.5]
 Mathworld by Eric Weisstein: Linear Algebra [R.15]
 The Matrix Cookbook by Kaare Brandt Petersen [R.14]

Acknowledgements
No originality is claimed for any of the material in this reference manual. The following books
have in particular been very helpful:

 A Survey of Matrix Theory and Matrix Inequalities by M Marcus & H Minc, Prindle,
Weber & Schmidt, 1964 / Dover, 1992 [R.12]
 Matrix Analysis and Topics in Matrix Analysis by R A Horn & C R Johnson, CUP
1990/1994, [R.10, R.11]
 Applied Linear Algebra by B. Noble and J.W.Daniel, Prentice-Hall, 1988 [R.13]
 Finite Dimensional Vector Spaces by P.R.Halmos, D Van Nostrand, 1958 [R.8]
 Generalized Inverses by A.Ben-Israel and T.N.E.Greville, Wiley1974 [R.3]
 Matrix Computations by G.H.Golub & C.F.Van Loan, John Hopkins University Press,
1983 ISBN 0-946536-00-7/05-8 [R.7]
 Matrix Methods in Stability Theory by S.Barnett and C.Storey, Nelson, 1970 [R.2]
 Complex Stochastic Processes: An Introduction to Theory and Application by K. S.
Miller, Addison-Wesley, 1974 [R.16]

I would like to thank the following people who have made suggestions or corrections to this
website and apologise to anyone whose name I have omitted from this list: Gerard Baron, Mike
Fairbank, Carlos Fernandes, Thomas Foregger, John Halleck, Olaf Kaehler, Ben Kennedy, James
Ng, Kaare Brandt Petersen, Jacopo Piazzi, Martin Zimmermann.

This page is part of The Matrix Reference Manual. Copyright © 1998-2017 Mike Brookes,
Imperial College, London, UK. See the file gfl.html for copying instructions. Please send any
comments or suggestions to "mike.brookes" at "imperial.ac.uk".
Updated: $Id: intro.html 11143 2019-05-31 11:27:18Z dmb $

Вам также может понравиться