Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

Function Reference


Desktop Tools and Development EnvironmentStartup, Command Window, help, editing and debugging, tuning, other general functions
Data Import and ExportGeneral and low-level file I/O, plus specific file formats, like audio, spreadsheet, HDF, images
MathematicsArrays and matrices, linear algebra, other areas of mathematics
Data AnalysisBasic data operations, descriptive statistics, covariance and correlation, filtering and convolution, numerical derivatives and integrals, Fourier transforms, time series analysis
Programming and Data TypesFunction/expression evaluation, program control, function handles, object oriented programming, error handling, operators, data types, dates and times, timers
Object-Oriented ProgrammingFunctions for working with classes and objects
GraphicsLine plots, annotating graphs, specialized plots, images, printing, Handle Graphics
3-D VisualizationSurface and mesh plots, view control, lighting and transparency, volume visualization
GUI DevelopmentGUIDE, programming graphical user interfaces
External InterfacesInterfaces to shared librariess, Java, .NET, COM and ActiveX, Web services, and serial port devices, and C and Fortran routines

Desktop Tools and Development Environment

Startup and ShutdownStartup and shutdown options, preferences
Command Window and HistoryControl Command Window and History, enter statements and run functions
Help for Using MATLABCommand line help, online documentation in the Help browser, demos
Workspace, Search Path, and File OperationsWork with files, MATLAB search path, manage variables
Programming ToolsEdit and debug M-files, improve performance, source control, publish results
SystemIdentify current computer, license, product version, and more

Startup and Shutdown

exitTerminate MATLAB program (same as quit)
finishTermination M-file for MATLAB program
matlab (UNIX)Start MATLAB program (UNIX platforms)
matlab (Windows)Start MATLAB program (Windows platforms)
matlabrcStartup M-file for MATLAB program
prefdirFolder containing preferences, history, and layout files
preferencesOpen Preferences dialog box
quitTerminate MATLAB program
startupStartup file for user-defined options
userpathView or change user portion of search path

Command Window and History

clcClear Command Window
commandhistoryOpen Command History window, or select it if already open
commandwindowOpen Command Window, or select it if already open
diarySave session to file
dosExecute DOS command and return result
formatSet display format for output
homeSend the cursor home
matlabcolon (matlab:)Run specified function via hyperlink
moreControl paged output for Command Window
perlCall Perl script using appropriate operating system executable
systemExecute operating system command and return result
unixExecute UNIX command and return result

Help for Using MATLAB

helpHelp for functions in Command Window
builddocsearchdbBuild searchable documentation database
demoAccess product demos via Help browser
docReference page in Help browser
docsearchHelp browser search
echodemoRun M-file demo step-by-step in Command Window
helpbrowserOpen Help browser to access online documentation and demos
helpwinProvide access to M-file help for all functions
infoInformation about contacting The MathWorks
lookforSearch for keyword in all help entries
playshowRun M-file demo (deprecated; use echodemo instead)
supportOpen MathWorks Technical Support Web page
webOpen Web site or file in Web or Help browser
whatsnewRelease Notes for MathWorks products

Workspace, Search Path, and File Operations

WorkspaceManage variables
Search PathView and change MATLAB search path
File OperationsView and change files and directories

Workspace

assigninAssign value to variable in specified workspace
clearRemove items from workspace, freeing up system memory
evalinExecute MATLAB expression in specified workspace
existCheck existence of variable, function, directory, or class
openvarOpen workspace variable in Variable Editor or other graphical editing tool
packConsolidate workspace memory
uiimportOpen Import Wizard to import data
whichLocate functions and files
who, whosList variables in workspace
workspaceOpen Workspace browser to manage workspace

Search Path

addpathAdd folders to search path
genpathGenerate path string
pathView or change search path
path2rcSave current search path to pathdef.m file
pathsepSearch path separator for current platform
pathtoolOpen Set Path dialog box to view and change search path
restoredefaultpathRestore default search path
rmpathRemove folders from search path
savepathSave current search path
userpathView or change user portion of search path

File Operations

See also Data Import and Export functions.

cdChange current folder
copyfileCopy file or folder
deleteRemove files or graphics objects
dirFolder listing
existCheck existence of variable, function, directory, or class
fileattribSet or get attributes of file or folder
filebrowserOpen Current Folder browser, or select it if already open
isdirDetermine whether input is folder
lookforSearch for keyword in all help entries
lsFolder contents
matlabrootRoot folder
mkdirMake new folder
movefileMove file or folder
pwdIdentify current folder
recycleSet option to move deleted files to recycle folder
rehashRefresh function and file system path caches
rmdirRemove folder
tempdirName of system's temporary folder
toolboxdirRoot folder for specified toolbox
typeDisplay contents of file
visdiffCompare two text files, MAT-Files, or binary files
whatList MATLAB files in folder
whichLocate functions and files

Programming Tools

M-File Editing and DebuggingEdit and debug M-files
M-File PerformanceImprove performance and find potential problems in M-files
Source ControlInterface MATLAB with source control system
PublishingPublish M-file code and results

M-File Editing and Debugging

clipboardCopy and paste strings to and from system clipboard
datatipinfoProduce short description of input variable
dbclearClear breakpoints
dbcontResume execution
dbdownReverse workspace shift performed by dbup, while in debug mode
dbquitQuit debug mode
dbstackFunction call stack
dbstatusList all breakpoints
dbstepExecute one or more lines from current breakpoint
dbstopSet breakpoints
dbtypeList M-file with line numbers
dbupShift current workspace to workspace of caller, while in debug mode
editEdit or create M-file
keyboardInput from keyboard

M-File Performance

benchMATLAB benchmark
mlintCheck M-files for possible problems
mlintrptRun mlint for file or folder, reporting results in browser
packConsolidate workspace memory
profileProfile execution time for function
profsaveSave profile report in HTML format
rehashRefresh function and file system path caches

Source Control

checkinCheck files into source control system (UNIX platforms)
checkoutCheck files out of source control system (UNIX platforms)
cmoptsName of source control system
customverctrlAllow custom source control system (UNIX platforms)
undocheckoutUndo previous checkout from source control system (UNIX platforms)
verctrlSource control actions (Windows platforms)

Publishing

grabcodeMATLAB code from M-files published to HTML
notebookOpen M-book in Microsoft Word software (on Microsoft Windows platforms)
publishPublish M-file containing cells, save output to specified file type
snapnowForce snapshot of image for inclusion in published document

System

Operating System InterfaceExchange operating system information and commands with MATLAB
MATLAB Version and LicenseInformation about MATLAB version and license

Operating System Interface

clipboardCopy and paste strings to and from system clipboard
computerInformation about computer on which MATLAB software is running
dosExecute DOS command and return result
getenvEnvironment variable
hostidServer host identification number
perlCall Perl script using appropriate operating system executable
setenvSet environment variable
systemExecute operating system command and return result
unixExecute UNIX command and return result
winqueryregItem from Windows registry

MATLAB Version and License

ismacDetermine if version is for Mac OS X platform
ispcDetermine if version is for Windows (PC) platform
isstudentDetermine if version is Student Version
isunixDetermine if version is for UNIX platform
javachkGenerate error message based on Sun Java feature support
licenseReturn license number or perform licensing task
prefdirFolder containing preferences, history, and layout files
usejavaDetermine whether Sun Java feature is supported in MATLAB software
verVersion information for MathWorks products
verLessThanCompare toolbox version to specified version string
versionVersion number for MATLAB and libraries

Data Import and Export

File Name ConstructionGet path, directory, filename information; construct filenames
File Opening, Loading, and SavingOpen files; transfer data between files and MATLAB workspace
Memory MappingAccess file data via memory map using MATLAB array indexing
Low-Level File I/OLow-level operations that use a file identifier
Text FilesDelimited or formatted I/O to text files
XML DocumentsDocuments written in Extensible Markup Language
SpreadsheetsExcel and Lotus 1-2-3 files
Scientific DataCDF, FITS, HDF formats
Audio and VideoRead and write audio and video, record and play audio
ImagesGraphics files
Internet ExchangeURL, FTP, zip, tar, and e-mail


To see a listing of file formats that are readable from MATLAB, go to file formats.

File Name Construction

filemarkerCharacter to separate file name and internal function name
filepartsParts of file name and path
filesepFile separator for current platform
fullfileBuild full file name from parts
tempdirName of system's temporary folder
tempnameUnique name for temporary file

File Opening, Loading, and Saving

daqreadRead Data Acquisition Toolbox (.daq) file
importdataLoad data from file
loadLoad workspace variables from disk
openOpen file in appropriate application
saveSave workspace variables to disk
uiimportOpen Import Wizard to import data
winopenOpen file in appropriate application (Windows)

Memory Mapping

disp (memmapfile)Information about memmapfile object
get (memmapfile)Memmapfile object properties
memmapfileConstruct memmapfile object

Low-Level File I/O

fcloseClose one or all open files
feofTest for end-of-file
ferrorInformation about file I/O errors
fgetlRead line from file, removing newline characters
fgetsRead line from file, keeping newline characters
fopenOpen file, or obtain information about open files
fprintfWrite data to text file
freadRead data from binary file
frewindMove file position indicator to beginning of open file
fscanfRead data from a text file
fseekMove to specified position in file
ftellPosition in open file
fwriteWrite data to binary file

Text Files

csvreadRead comma-separated value file
csvwriteWrite comma-separated value file
dlmreadRead ASCII-delimited file of numeric data into matrix
dlmwriteWrite matrix to ASCII-delimited file
filereadRead contents of file into string
textreadRead data from text file; write to multiple outputs
textscanRead formatted data from text file or string

XML Documents

xmlreadParse XML document and return Document Object Model node
xmlwriteSerialize XML Document Object Model node
xsltTransform XML document using XSLT engine

Spreadsheets

Microsoft ExcelRead and write Microsoft Excel spreadsheet
Lotus 1-2-3Read and write Lotus WK1 spreadsheet

Microsoft Excel

xlsfinfoDetermine whether file contains a Microsoft Excel spreadsheet
xlsreadRead Microsoft Excel spreadsheet file
xlswriteWrite Microsoft Excel spreadsheet file

Lotus 1-2-3

wk1finfoDetermine whether file contains 1-2-3 WK1 worksheet
wk1readRead Lotus 1-2-3 WK1 spreadsheet file into matrix
wk1writeWrite matrix to Lotus 1-2-3 WK1 spreadsheet file

Scientific Data

Common Data FormatWork with CDF files
Network Common Data FormWork with netCDF files
Flexible Image Transport SystemWork with FITS files
Hierarchical Data FormatWork with HDF files
Band-Interleaved DataWork with band-interleaved files

Common Data Format

cdfepochConvert MATLAB formatted dates to CDF formatted dates
cdfinfoInformation about Common Data Format (CDF) file
cdfreadRead data from Common Data Format (CDF) file
cdfwriteWrite data to Common Data Format (CDF) file
todatenumConvert CDF epoch object to MATLAB datenum

Network Common Data Form

File Operations

netcdfSummary of MATLAB Network Common Data Form (netCDF) capabilities
netcdf.abortRevert recent netCDF file definitions
netcdf.closeClose netCDF file
netcdf.createCreate new netCDF dataset
netcdf.endDefEnd netCDF file define mode
netcdf.getConstantReturn numeric value of named constant
netcdf.getConstantNamesReturn list of constants known to netCDF library
netcdf.inq Return information about netCDF file
netcdf.inqLibVersReturn netCDF library version information
netcdf.openOpen netCDF file
netcdf.reDefPut open netCDF file into define mode
netcdf.setDefaultFormatChange default netCDF file format
netcdf.setFillSet netCDF fill mode
netcdf.syncSynchronize netCDF file to disk

Dimensions

netcdf.defDimCreate netCDF dimension
netcdf.inqDimReturn netCDF dimension name and length
netcdf.inqDimIDReturn dimension ID
netcdf.renameDimChange name of netCDF dimension

Variables

netcdf.defVarCreate netCDF variable
netcdf.getVarReturn data from netCDF variable
netcdf.inqVarReturn information about variable
netcdf.inqVarIDReturn ID associated with variable name
netcdf.putVarWrite data to netCDF variable
netcdf.renameVarChange name of netCDF variable

Attributes

netcdf.copyAttCopy attribute to new location
netcdf.delAttDelete netCDF attribute
netcdf.getAttReturn netCDF attribute
netcdf.inqAttReturn information about netCDF attribute
netcdf.inqAttIDReturn ID of netCDF attribute
netcdf.inqAttNameReturn name of netCDF attribute
netcdf.putAttWrite netCDF attribute
netcdf.renameAttChange name of attribute

Flexible Image Transport System

fitsinfoInformation about FITS file
fitsreadRead data from FITS file

Hierarchical Data Format

hdfSummary of MATLAB HDF4 capabilities
hdf5Summary of MATLAB HDF5 capabilities
hdf5infoInformation about HDF5 file
hdf5readRead HDF5 file
hdf5writeWrite data to file in HDF5 format
hdfinfoInformation about HDF4 or HDF-EOS file
hdfreadRead data from HDF4 or HDF-EOS file
hdftoolBrowse and import data from HDF4 or HDF-EOS files

Band-Interleaved Data

multibandreadRead band-interleaved data from binary file
multibandwriteWrite band-interleaved data to file

Audio and Video

Reading and Writing FilesInput/output data to audio and video file formats
Recording and PlaybackRecord and listen to audio
UtilitiesConvert audio signal

Reading and Writing Files

addframe (avifile)Add frame to Audio/Video Interleaved (AVI) file
aufinfoInformation about NeXT/SUN (.au) sound file
aureadRead NeXT/SUN (.au) sound file
auwriteWrite NeXT/SUN (.au) sound file
avifileCreate new Audio/Video Interleaved (AVI) file
aviinfoInformation about Audio/Video Interleaved (AVI) file
avireadRead Audio/Video Interleaved (AVI) file
close (avifile)Close Audio/Video Interleaved (AVI) file
mmfileinfoInformation about multimedia file
mmreaderCreate multimedia reader object for reading video files
mmreader.isPlatformSupportedDetermine whether mmreader is available on current platform
movie2aviCreate Audio/Video Interleaved (AVI) movie from MATLAB movie
read (mmreader)Read video frame data from multimedia reader object
wavfinfoInformation about WAVE (.wav) sound file
wavreadRead WAVE (.wav) sound file
wavwriteWrite WAVE (.wav) sound file

Recording and Playback

audiodevinfoInformation about audio device
audioplayerCreate audioplayer object
audiorecorderCreate audiorecorder object
soundConvert vector into sound
soundscScale data and play as sound
wavplayPlay recorded sound on PC-based audio output device
wavrecordRecord sound using PC-based audio input device

Utilities

beepProduce beep sound
lin2muConvert linear audio signal to mu-law
mu2linConvert mu-law audio signal to linear

Images

exifreadRead EXIF information from JPEG and TIFF image files
im2javaConvert image to Java image
imfinfoInformation about graphics file
imreadRead image from graphics file
imwriteWrite image to graphics file
TiffMATLAB Gateway to LibTIFF library routines

Internet Exchange

URL, Zip, Tar, E-MailSend e-mail, read from given URL, extract from tar or zip file, compress and decompress files
FTPConnect to FTP server, download from server, manage FTP files, close server connection

URL, Zip, Tar, E-Mail

gunzipUncompress GNU zip files
gzipCompress files into GNU zip files
sendmailSend e-mail message to address list
tarCompress files into tar file
untarExtract contents of tar file
unzipExtract contents of zip file
urlreadDownload content at URL into MATLAB string
urlwriteDownload content at URL and save to file
zipCompress files into zip file

FTP

asciiSet FTP transfer type to ASCII
binarySet FTP transfer type to binary
cd (ftp)Change current directory on FTP server
close (ftp)Close connection to FTP server
delete (ftp)Remove file on FTP server
dir (ftp)Directory contents on FTP server
ftpConnect to FTP server, creating FTP object
mgetDownload file from FTP server
mkdir (ftp)Create new directory on FTP server
mputUpload file or directory to FTP server
renameRename file on FTP server
rmdir (ftp)Remove directory on FTP server

Mathematics

Arrays and MatricesBasic array operators and operations, creation of elementary and specialized arrays and matrices
Linear AlgebraMatrix analysis, linear equations, eigenvalues, singular values, logarithms, exponentials, factorization
Elementary MathTrigonometry, exponentials and logarithms, complex values, rounding, remainders, discrete math
PolynomialsMultiplication, division, evaluation, roots, derivatives, integration, eigenvalue problem, curve fitting, partial fraction expansion
Interpolation and Computational GeometryInterpolation, Delaunay triangulation and tessellation, convex hulls, Voronoi diagrams, domain generation
Cartesian Coordinate System ConversionConversions between Cartesian and polar or spherical coordinates
Nonlinear Numerical MethodsDifferential equations, optimization, integration
Specialized MathAiry, Bessel, Jacobi, Legendre, beta, elliptic, error, exponential integral, gamma functions
Sparse MatricesElementary sparse matrices, operations, reordering algorithms, linear algebra, iterative methods, tree operations
Math ConstantsPi, imaginary unit, infinity, Not-a-Number, largest and smallest positive floating point numbers, floating point relative accuracy

Arrays and Matrices

Basic InformationDisplay array contents, get array information, determine array type
OperatorsArithmetic operators
Elementary Matrices and ArraysCreate elementary arrays of different types, generate arrays for plotting, array indexing, etc.
Array OperationsOperate on array content, apply function to each array element, find cumulative product or sum, etc.
Array ManipulationCreate, sort, rotate, permute, reshape, and shift array contents
Specialized MatricesCreate Hadamard, Companion, Hankel, Vandermonde, Pascal matrices, etc.

Basic Information

dispDisplay text or array
displayDisplay text or array (overloaded method)
isemptyDetermine whether array is empty
isequalTest arrays for equality
isequalwithequalnansTest arrays for equality, treating NaNs as equal
isfiniteArray elements that are finite
isfloatDetermine whether input is floating-point array
isinfArray elements that are infinite
isintegerDetermine whether input is integer array
islogicalDetermine whether input is logical array
isnanArray elements that are NaN
isnumericDetermine whether input is numeric array
isscalarDetermine whether input is scalar
issparseDetermine whether input is sparse
isvectorDetermine whether input is vector
lengthLength of vector or largest array dimension
maxLargest elements in array
minSmallest elements in array
ndimsNumber of array dimensions
numelNumber of elements in array or subscripted array expression
sizeArray dimensions

Operators

+Addition
+Unary plus
-Subtraction
-Unary minus
*Matrix multiplication
^Matrix power
\Backslash or left matrix divide
/Slash or right matrix divide
'Transpose
.'Nonconjugated transpose
.*Array multiplication (element-wise)
.^Array power (element-wise)
.\Left array divide (element-wise)
./Right array divide (element-wise)

Elementary Matrices and Arrays

blkdiagConstruct block diagonal matrix from input arguments
diagDiagonal matrices and diagonals of matrix
eyeIdentity matrix
freqspaceFrequency spacing for frequency response
ind2subSubscripts from linear index
linspaceGenerate linearly spaced vectors
logspaceGenerate logarithmically spaced vectors
meshgridGenerate X and Y arrays for 3-D plots
ndgridGenerate arrays for N-D functions and interpolation
onesCreate array of all ones
randUniformly distributed pseudorandom numbers
randiUniformly distributed pseudorandom integers
randnNormally distributed pseudorandom numbers
RandStreamRandom number stream
sub2indSingle index from subscripts
zerosCreate array of all zeros

Array Operations

See Linear Algebra and Elementary Math for other array operations.

accumarrayConstruct array with accumulation
arrayfunApply function to each element of array
bsxfunApply element-by-element binary operation to two arrays with singleton expansion enabled
castCast variable to different data type
crossVector cross product
cumprodCumulative product
cumsumCumulative sum
dotVector dot product
idivideInteger division with rounding option
kronKronecker tensor product
prodProduct of array elements
sumSum of array elements
trilLower triangular part of matrix
triuUpper triangular part of matrix

Array Manipulation

blkdiagConstruct block diagonal matrix from input arguments
catConcatenate arrays along specified dimension
circshiftShift array circularly
diagDiagonal matrices and diagonals of matrix
endTerminate block of code, or indicate last array index
flipdimFlip array along specified dimension
fliplrFlip matrix left to right
flipudFlip matrix up to down
horzcatConcatenate arrays horizontally
inlineConstruct inline object
ipermuteInverse permute dimensions of N-D array
permuteRearrange dimensions of N-D array
repmatReplicate and tile array
reshapeReshape array
rot90Rotate matrix 90 degrees
shiftdimShift dimensions
sortSort array elements in ascending or descending order
sortrowsSort rows in ascending order
squeezeRemove singleton dimensions
vectorizeVectorize expression
vertcatConcatenate arrays vertically

Specialized Matrices

companCompanion matrix
galleryTest matrices
hadamardHadamard matrix
hankelHankel matrix
hilbHilbert matrix
invhilbInverse of Hilbert matrix
magicMagic square
pascalPascal matrix
rosserClassic symmetric eigenvalue test problem
toeplitzToeplitz matrix
vanderVandermonde matrix
wilkinsonWilkinson's eigenvalue test matrix

Linear Algebra

Matrix AnalysisCompute norm, rank, determinant, condition number, etc.
Linear EquationsSolve linear systems, least squares, LU factorization, Cholesky factorization, etc.
Eigenvalues and Singular ValuesEigenvalues, eigenvectors, Schur decomposition, Hessenburg matrices, etc.
Matrix Logarithms and ExponentialsMatrix logarithms, exponentials, square root
FactorizationCholesky, LU, and QR factorizations, diagonal forms, singular value decomposition

Matrix Analysis

condCondition number with respect to inversion
condeigCondition number with respect to eigenvalues
detMatrix determinant
normVector and matrix norms
normest2-norm estimate
nullNull space
orthRange space of matrix
rankRank of matrix
rcondMatrix reciprocal condition number estimate
rrefReduced row echelon form
subspaceAngle between two subspaces
traceSum of diagonal elements

Linear Equations

cholCholesky factorization
cholincSparse incomplete Cholesky and Cholesky-Infinity factorizations
condCondition number with respect to inversion
condest1-norm condition number estimate
funmEvaluate general matrix function
iluSparse incomplete LU factorization
invMatrix inverse
ldl Block LDL' factorization for Hermitian indefinite matrices
linsolveSolve linear system of equations
lscovLeast-squares solution in presence of known covariance
lsqnonnegSolve nonnegative least-squares constraints problem
luLU matrix factorization
luincSparse incomplete LU factorization
pinvMoore-Penrose pseudoinverse of matrix
qrOrthogonal-triangular decomposition
rcondMatrix reciprocal condition number estimate

Eigenvalues and Singular Values

balanceDiagonal scaling to improve eigenvalue accuracy
cdf2rdfConvert complex diagonal form to real block diagonal form
condeigCondition number with respect to eigenvalues
eigEigenvalues and eigenvectors
eigsLargest eigenvalues and eigenvectors of matrix
gsvdGeneralized singular value decomposition
hessHessenberg form of matrix
ordeigEigenvalues of quasitriangular matrices
ordqzReorder eigenvalues in QZ factorization
ordschurReorder eigenvalues in Schur factorization
polyPolynomial with specified roots
polyeigPolynomial eigenvalue problem
rsf2csfConvert real Schur form to complex Schur form
schurSchur decomposition
sqrtmMatrix square root
ss2tfConvert state-space filter parameters to transfer function form
svdSingular value decomposition
svdsFind singular values and vectors

Matrix Logarithms and Exponentials

expmMatrix exponential
logmMatrix logarithm
sqrtmMatrix square root

Factorization

balanceDiagonal scaling to improve eigenvalue accuracy
cdf2rdfConvert complex diagonal form to real block diagonal form
cholCholesky factorization
cholincSparse incomplete Cholesky and Cholesky-Infinity factorizations
cholupdateRank 1 update to Cholesky factorization
gsvdGeneralized singular value decomposition
iluSparse incomplete LU factorization
ldl Block LDL' factorization for Hermitian indefinite matrices
luLU matrix factorization
luincSparse incomplete LU factorization
planerotGivens plane rotation
qrOrthogonal-triangular decomposition
qrdeleteRemove column or row from QR factorization
qrinsertInsert column or row into QR factorization
qrupdate
qzQZ factorization for generalized eigenvalues
rsf2csfConvert real Schur form to complex Schur form
svdSingular value decomposition

Elementary Math

TrigonometricTrigonometric functions with results in radians or degrees
ExponentialExponential, logarithm, power, and root functions
ComplexNumbers with real and imaginary components, phase angles
Rounding and RemainderRounding, modulus, and remainder
Discrete MathPrime factors, factorials, permutations, rational fractions, least common multiple, greatest common divisor

Trigonometric

acosInverse cosine; result in radians
acosdInverse cosine; result in degrees
acoshInverse hyperbolic cosine
acotInverse cotangent; result in radians
acotdInverse cotangent; result in degrees
acothInverse hyperbolic cotangent
acscInverse cosecant; result in radians
acscdInverse cosecant; result in degrees
acschInverse hyperbolic cosecant
asecInverse secant; result in radians
asecdInverse secant; result in degrees
asechInverse hyperbolic secant
asinInverse sine; result in radians
asindInverse sine; result in degrees
asinhInverse hyperbolic sine
atanInverse tangent; result in radians
atan2Four-quadrant inverse tangent
atandInverse tangent; result in degrees
atanhInverse hyperbolic tangent
cosCosine of argument in radians
cosdCosine of argument in degrees
coshHyperbolic cosine
cotCotangent of argument in radians
cotdCotangent of argument in degrees
cothHyperbolic cotangent
cscCosecant of argument in radians
cscdCosecant of argument in degrees
cschHyperbolic cosecant
hypotSquare root of sum of squares
secSecant of argument in radians
secdSecant of argument in degrees
sechHyperbolic secant
sinSine of argument in radians
sindSine of argument in degrees
sinhHyperbolic sine of argument in radians
tanTangent of argument in radians
tandTangent of argument in degrees
tanhHyperbolic tangent

Exponential

expExponential
expm1Compute exp(x)-1 accurately for small values of x
logNatural logarithm
log10Common (base 10) logarithm
log1pCompute log(1+x) accurately for small values of x
log2Base 2 logarithm and dissect floating-point numbers into exponent and mantissa
nextpow2Next higher power of 2
nthrootReal nth root of real numbers
pow2Base 2 power and scale floating-point numbers
reallogNatural logarithm for nonnegative real arrays
realpowArray power for real-only output
realsqrtSquare root for nonnegative real arrays
sqrtSquare root

Complex

absAbsolute value and complex magnitude
anglePhase angle
complexConstruct complex data from real and imaginary components
conjComplex conjugate
cplxpairSort complex numbers into complex conjugate pairs
iImaginary unit
imagImaginary part of complex number
isrealCheck if input is real array
jImaginary unit
realReal part of complex number
signSignum function
unwrapCorrect phase angles to produce smoother phase plots

Rounding and Remainder

ceilRound toward positive infinity
fixRound toward zero
floorRound toward negative infinity
idivideInteger division with rounding option
modModulus after division
remRemainder after division
roundRound to nearest integer

Discrete Math

factorPrime factors
factorialFactorial function
gcdGreatest common divisor
isprimeArray elements that are prime numbers
lcmLeast common multiple
nchoosekBinomial coefficient or all combinations
permsAll possible permutations
primesGenerate list of prime numbers
rat, ratsRational fraction approximation

Polynomials

convConvolution and polynomial multiplication
deconvDeconvolution and polynomial division
polyPolynomial with specified roots
polyderPolynomial derivative
polyeigPolynomial eigenvalue problem
polyfitPolynomial curve fitting
polyintIntegrate polynomial analytically
polyvalPolynomial evaluation
polyvalmMatrix polynomial evaluation
residueConvert between partial fraction expansion and polynomial coefficients
rootsPolynomial roots

Interpolation and Computational Geometry

InterpolationData interpolation, data gridding, polynomial evaluation, nearest point search
Delaunay Triangulation and TessellationDelaunay triangulation and tessellation, triangular surface and mesh plots
Convex HullPlot convex hull, plotting functions
Voronoi DiagramsPlot Voronoi diagram, patch graphics object, plotting functions
Domain GenerationGenerate arrays for 3-D plots, or for N-D functions and interpolation

Interpolation

dsearchSearch Delaunay triangulation for nearest point
dsearchnN-D nearest point search
griddataData gridding
griddata3Data gridding and hypersurface fitting for 3-D data
griddatanData gridding and hypersurface fitting (dimension >= 2)
interp11-D data interpolation (table lookup)
interp1qQuick 1-D linear interpolation
interp22-D data interpolation (table lookup)
interp33-D data interpolation (table lookup)
interpft1-D interpolation using FFT method
interpnN-D data interpolation (table lookup)
meshgridGenerate X and Y arrays for 3-D plots
mkppMake piecewise polynomial
ndgridGenerate arrays for N-D functions and interpolation
padecoefPadé approximation of time delays
pchipPiecewise Cubic Hermite Interpolating Polynomial (PCHIP)
ppvalEvaluate piecewise polynomial
splineCubic spline data interpolation
tsearchSearch for enclosing Delaunay triangle
tsearchnN-D closest simplex search
unmkppPiecewise polynomial details

Delaunay Triangulation and Tessellation

baryToCart (TriRep)Converts point coordinates from barycentric to Cartesian
cartToBary (TriRep) Convert point coordinates from cartesian to barycentric
circumcenters (TriRep)Circumcenters of specified simplices
delaunayDelaunay triangulation
delaunay33-D Delaunay tessellation
delaunaynN-D Delaunay tessellation
DelaunayTriDelaunay triangulation in 2-D and 3-D
DelaunayTriContruct Delaunay triangulation
edgeAttachments (TriRep)Simplices attached to specified edges
edges (TriRep)Triangulation edges
faceNormals (TriRep)Unit normals to specified triangles
featureEdges (TriRep)Sharp edges of surface triangulation
freeBoundary (TriRep)Facets referenced by only one simplex
incenters (TriRep)Incenters of specified simplices
inOutStatus (DelaunayTri)Status of triangles in 2-D constrained Delaunay triangulation
isEdge (TriRep) Test if vertices are joined by edge
nearestNeighbor (DelaunayTri)Point closest to specified location
neighbors (TriRep)Simplex neighbor information
pointLocation (DelaunayTri)Simplex containing specified location
size (TriRep)Size of triangulation matrix
tetrameshTetrahedron mesh plot
trimeshTriangular mesh plot
triplot2-D triangular plot
TriRepTriangulation representation
TriRepTriangulation representation
TriScatteredInterpInterpolate scattered data
TriScatteredInterpInterpolate scattered data
trisurfTriangular surface plot
vertexAttachments (TriRep)Return simplices attached to specified vertices

Convex Hull

convexHull (DelaunayTri)Convex hull
convhullConvex hull
convhullnN-D convex hull
patchCreate one or more filled polygons
plot2-D line plot
trisurfTriangular surface plot

Voronoi Diagrams

patchCreate one or more filled polygons
plot2-D line plot
voronoiVoronoi diagram
voronoiDiagram (DelaunayTri)Voronoi diagram
voronoinN-D Voronoi diagram

Domain Generation

meshgridGenerate X and Y arrays for 3-D plots
ndgridGenerate arrays for N-D functions and interpolation

Cartesian Coordinate System Conversion

cart2polTransform Cartesian coordinates to polar or cylindrical
cart2sphTransform Cartesian coordinates to spherical
pol2cartTransform polar or cylindrical coordinates to Cartesian
sph2cartTransform spherical coordinates to Cartesian

Nonlinear Numerical Methods

Ordinary Differential EquationsSolve stiff and nonstiff differential equations, define the problem, set solver options, evaluate solution
Delay Differential EquationsSolve delay differential equations with constant and general delays, set solver options, evaluate solution
Boundary Value ProblemsSolve boundary value problems for ordinary differential equations, set solver options, evaluate solution
Partial Differential EquationsSolve initial-boundary value problems for parabolic-elliptic PDEs, evaluate solution
OptimizationFind minimum of single and multivariable functions, solve nonnegative least-squares constraint problem
Numerical Integration (Quadrature)Evaluate Simpson, Lobatto, and vectorized quadratures, evaluate double and triple integrals

Ordinary Differential Equations

decicCompute consistent initial conditions for ode15i
devalEvaluate solution of differential equation problem
ode15iSolve fully implicit differential equations, variable order method
ode23, ode45, ode113, ode15s, ode23s, ode23t, ode23tbSolve initial value problems for ordinary differential equations
odefileDefine differential equation problem for ordinary differential equation solvers
odegetOrdinary differential equation options parameters
odesetCreate or alter options structure for ordinary differential equation solvers
odextendExtend solution of initial value problem for ordinary differential equation

Delay Differential Equations

dde23Solve delay differential equations (DDEs) with constant delays
ddegetExtract properties from delay differential equations options structure
ddesdSolve delay differential equations (DDEs) with general delays
ddesetCreate or alter delay differential equations options structure
devalEvaluate solution of differential equation problem

Boundary Value Problems

bvp4cSolve boundary value problems for ordinary differential equations
bvp5cSolve boundary value problems for ordinary differential equations
bvpgetExtract properties from options structure created with bvpset
bvpinitForm initial guess for bvp4c
bvpsetCreate or alter options structure of boundary value problem
bvpxtendForm guess structure for extending boundary value solutions
devalEvaluate solution of differential equation problem

Partial Differential Equations

pdepeSolve initial-boundary value problems for parabolic-elliptic PDEs in 1-D
pdevalEvaluate numerical solution of PDE using output of pdepe

Optimization

fminbndFind minimum of single-variable function on fixed interval
fminsearchFind minimum of unconstrained multivariable function using derivative-free method
fzeroFind root of continuous function of one variable
lsqnonnegSolve nonnegative least-squares constraints problem
optimgetOptimization options values
optimsetCreate or edit optimization options structure

Numerical Integration (Quadrature)

dblquadNumerically evaluate double integral over a rectangle
quadNumerically evaluate integral, adaptive Simpson quadrature
quad2dNumerically evaluate double integral over planar region
quadgkNumerically evaluate integral, adaptive Gauss-Kronrod quadrature
quadlNumerically evaluate integral, adaptive Lobatto quadrature
quadvVectorized quadrature
triplequadNumerically evaluate triple integral

Specialized Math

airyAiry functions
besselhBessel function of third kind (Hankel function)
besseliModified Bessel function of first kind
besseljBessel function of first kind
besselkModified Bessel function of second kind
besselyBessel function of second kind
betaBeta function
betaincIncomplete beta function
betaincinvBeta inverse cumulative distribution function
betalnLogarithm of beta function
ellipjJacobi elliptic functions
ellipkeComplete elliptic integrals of first and second kind
erf, erfc, erfcx, erfinv, erfcinvError functions
expintExponential integral
gamma, gammainc, gammalnGamma functions
gammaincinvInverse incomplete gamma function
legendreAssociated Legendre functions
psiPsi (polygamma) function

Sparse Matrices

Elementary Sparse MatricesCreate random and nonrandom sparse matrices
Full to Sparse ConversionConvert full matrix to sparse, sparse matrix to full
Sparse Matrix ManipulationTest matrix for sparseness, get information on sparse matrix, allocate sparse matrix, apply function to nonzero elements, visualize sparsity pattern
Reordering AlgorithmsRandom, column, minimum degree, Dulmage-Mendelsohn, and reverse Cuthill-McKee permutations
Linear AlgebraCompute norms, eigenvalues, factorizations, least squares, structural rank
Linear Equations (Iterative Methods)Methods for conjugate and biconjugate gradients, residuals, lower quartile
Tree OperationsElimination trees, tree plotting, factorization analysis

Elementary Sparse Matrices

spdiagsExtract and create sparse band and diagonal matrices
speyeSparse identity matrix
sprandSparse uniformly distributed random matrix
sprandnSparse normally distributed random matrix
sprandsymSparse symmetric random matrix

Full to Sparse Conversion

findFind indices and values of nonzero elements
fullConvert sparse matrix to full matrix
sparseCreate sparse matrix
spconvertImport matrix from sparse matrix external format

Sparse Matrix Manipulation

issparseDetermine whether input is sparse
nnzNumber of nonzero matrix elements
nonzerosNonzero matrix elements
nzmaxAmount of storage allocated for nonzero matrix elements
spallocAllocate space for sparse matrix
spfunApply function to nonzero sparse matrix elements
sponesReplace nonzero sparse matrix elements with ones
spparmsSet parameters for sparse matrix routines
spyVisualize sparsity pattern

Reordering Algorithms

amdApproximate minimum degree permutation
colamdColumn approximate minimum degree permutation
colpermSparse column permutation based on nonzero count
dmpermDulmage-Mendelsohn decomposition
ldl Block LDL' factorization for Hermitian indefinite matrices
randpermRandom permutation
symamdSymmetric approximate minimum degree permutation
symrcmSparse reverse Cuthill-McKee ordering

Linear Algebra

cholincSparse incomplete Cholesky and Cholesky-Infinity factorizations
condest1-norm condition number estimate
eigsLargest eigenvalues and eigenvectors of matrix
iluSparse incomplete LU factorization
luincSparse incomplete LU factorization
normest2-norm estimate
spaugmentForm least squares augmented system
sprankStructural rank
svdsFind singular values and vectors

Linear Equations (Iterative Methods)

bicgBiconjugate gradients method
bicgstabBiconjugate gradients stabilized method
bicgstablBiconjugate gradients stabilized (l) method
cgsConjugate gradients squared method
gmresGeneralized minimum residual method (with restarts)
lsqrLSQR method
minresMinimum residual method
pcgPreconditioned conjugate gradients method
qmrQuasi-minimal residual method
symmlqSymmetric LQ method
tfqmrTranspose-free quasi-minimal residual method

Tree Operations

etreeElimination tree
etreeplotPlot elimination tree
gplotPlot nodes and links representing adjacency matrix
symbfactSymbolic factorization analysis
treelayoutLay out tree or forest
treeplotPlot picture of tree
unmeshConvert edge matrix to coordinate and Laplacian matrices

Math Constants

epsFloating-point relative accuracy
iImaginary unit
InfInfinity
intmaxLargest value of specified integer type
intminSmallest value of specified integer type
jImaginary unit
NaNNot-a-Number
piRatio of circle's circumference to its diameter
realmaxLargest positive floating-point number
realminSmallest positive normalized floating-point number

Data Analysis

Basic OperationsSums, products, sorting
Descriptive StatisticsStatistical summaries of data
Filtering and ConvolutionData preprocessing
Interpolation and RegressionData fitting
Fourier TransformsFrequency content of data
Derivatives and IntegralsData rates and accumulations
Time Series ObjectsMethods for timeseries objects
Time Series CollectionsMethods for tscollection objects

Basic Operations

brushInteractively mark, delete, modify, and save observations in graphs
cumprodCumulative product
cumsumCumulative sum
linkdataAutomatically update graphs when variables change
prodProduct of array elements
sortSort array elements in ascending or descending order
sortrowsSort rows in ascending order
sumSum of array elements

Descriptive Statistics

corrcoefCorrelation coefficients
covCovariance matrix
maxLargest elements in array
meanAverage or mean value of array
medianMedian value of array
minSmallest elements in array
modeMost frequent values in array
stdStandard deviation
varVariance

Filtering and Convolution

convConvolution and polynomial multiplication
conv22-D convolution
convnN-D convolution
deconvDeconvolution and polynomial division
detrendRemove linear trends
filter1-D digital filter
filter22-D digital filter

Interpolation and Regression

interp11-D data interpolation (table lookup)
interp22-D data interpolation (table lookup)
interp33-D data interpolation (table lookup)
interpnN-D data interpolation (table lookup)
mldivide \, mrdivide /Left or right matrix division
polyfitPolynomial curve fitting
polyvalPolynomial evaluation

Fourier Transforms

absAbsolute value and complex magnitude
anglePhase angle
cplxpairSort complex numbers into complex conjugate pairs
fftDiscrete Fourier transform
fft22-D discrete Fourier transform
fftnN-D discrete Fourier transform
fftshiftShift zero-frequency component to center of spectrum
fftwInterface to FFTW library run-time algorithm tuning control
ifftInverse discrete Fourier transform
ifft22-D inverse discrete Fourier transform
ifftnN-D inverse discrete Fourier transform
ifftshiftInverse FFT shift
nextpow2Next higher power of 2
unwrapCorrect phase angles to produce smoother phase plots

Derivatives and Integrals

cumtrapzCumulative trapezoidal numerical integration
del2Discrete Laplacian
diffDifferences and approximate derivatives
gradientNumerical gradient
polyderPolynomial derivative
polyintIntegrate polynomial analytically
trapzTrapezoidal numerical integration

Time Series Objects

UtilitiesCombine timeseries objects, query and set timeseries object properties, plot timeseries objects
Data ManipulationAdd or delete data, manipulate timeseries objects
Event DataAdd or delete events, create new timeseries objects based on event data
Descriptive StatisticsDescriptive statistics for timeseries objects

Utilities

get (timeseries)Query timeseries object property values
getdatasamplesizeSize of data sample in timeseries object
getqualitydescData quality descriptions
isempty (timeseries)Determine whether timeseries object is empty
length (timeseries)Length of time vector
plot (timeseries)Plot time series
set (timeseries)Set properties of timeseries object
size (timeseries)Size of timeseries object
timeseriesCreate timeseries object
tsdata.eventConstruct event object for timeseries object
tspropsHelp on timeseries object properties
tstoolOpen Time Series Tools GUI

Data Manipulation

addsampleAdd data sample to timeseries object
ctranspose (timeseries)Transpose timeseries object
delsampleRemove sample from timeseries object
detrend (timeseries)Subtract mean or best-fit line and all NaNs from time series
filter (timeseries)Shape frequency content of time series
getabstime (timeseries)Extract date-string time vector into cell array
getinterpmethodInterpolation method for timeseries object
getsampleusingtime (timeseries)Extract data samples into new timeseries object
idealfilter (timeseries)Apply ideal (noncausal) filter to timeseries object
resample (timeseries)Select or interpolate timeseries data using new time vector
setabstime (timeseries)Set times of timeseries object as date strings
setinterpmethodSet default interpolation method for timeseries object
synchronizeSynchronize and resample two timeseries objects using common time vector
transpose (timeseries)Transpose timeseries object
vertcat (timeseries)Vertical concatenation of timeseries objects

Event Data

addeventAdd event to timeseries object
deleventRemove tsdata.event objects from timeseries object
gettsafterateventNew timeseries object with samples occurring at or after event
gettsaftereventNew timeseries object with samples occurring after event
gettsateventNew timeseries object with samples occurring at event
gettsbeforeateventNew timeseries object with samples occurring before or at event
gettsbeforeeventNew timeseries object with samples occurring before event
gettsbetweeneventsNew timeseries object with samples occurring between events

Descriptive Statistics

iqr (timeseries)Interquartile range of timeseries data
max (timeseries)Maximum value of timeseries data
mean (timeseries)Mean value of timeseries data
median (timeseries)Median value of timeseries data
min (timeseries)Minimum value of timeseries data
std (timeseries)Standard deviation o