ABSTRACT

Help topics page general General purpose commands 142 ops Operators and special characters 144 lang Programming language constructs 147 elmat

Elementary matrices and matrix manipulation 149

22.1 General purpose commands help general

General information syntax Help on MATLAB command syntax demo Run demonstrations ver MATLAB, Simulink, & toolbox version version MATLAB version information

Managing the workspace who List current variables whos List current variables, long form clear Clear variables, functions from memory pack Consolidate workspace memory load Load variables from MAT-or ASCII file save Save variables to MAT-or ASCII file saveas Save figure or model to file memory Help for memory limitations recycle Recycle folder option for deleted files quit Quit MATLAB session exit Exit from MATLAB

Managing commands and functions what List MATLAB-specific files in directory type List M-file open Open files by extension which Locate functions and files pcode Create pre-parsed P-file mex Compile MEX-function inmem List functions in memory namelengthmax Max length of function or variable name

Managing the search path path Get/set search path addpath Add directory to search path rmpath Remove directory from search path rehash Refresh function and file system caches import Import Java packages into current scope finfo Identify file type genpath Generate recursive toolbox path savepath Save MATLAB path in pathdef.m file

Managing the Java search path javaaddpath Add directories to the dynamic Java path javaclasspath Get and set Java path javarmpath Remove dynamic Java path directory

Controlling the Command window echo Echo commands in M-files more Paged output in command window diary Save text of MATLAB session format Set output format beep Produce beep sound desktop Start and query the MATLAB Desktop preferences MATLAB user preferences dialog

Debugging debug List debugging commands

Locate dependent functions of an M-file depfun Find dependent functions of M-or P-file depdir Find dependent directories of M or P-file

Operating system commands cd Change current working directory copyfile Copy file or directory movefile Move file or directory delete Delete file or graphics object pwd Show (print) current working directory dir List directory ls List directory fileattrib Set/get attributes of files and directories isdir True if argument is a directory mkdir Make new directory rmdir Remove directory getenv Get environment variable ! Execute operating system command dos Execute DOS command and return result unix Execute Unix command and return result system Execute system command, return result perl Execute Perl command and return result computer Computer type isunix True for Unix version of MATLAB ispc True for Windows version of MATLAB

Loading and calling shared libraries calllib Call a function in an external library libpointer Create pointer for external libraries libstruct Create structure ptr. for external libraries libisloaded True if specified shared library is loaded loadlibrary Load a shared library into MATLAB libfunctions Info. on functions in external library libfunctionsview View functions in external library unloadlibrary Unload a shared library java Using Java from within MATLAB usejava True if Java feature supported

22.2 Operators and special characters help ops

Bitwise operators bitand Bit-wise AND bitcmp Complement bits bitor Bit-wise OR bitmax Maximum floating-point integer bitxor Bit-wise EXCLUSIVE OR bitset Set bit bitget Get bit bitshift Bit-wise shift

Set operators union Set union unique Set unique intersect Set intersection setdiff Set difference setxor Set exclusive-or ismember True for set member

22.3 Programming language constructs help lang

Scripts, functions, and variables script About MATLAB scripts and M-files function Add new function global Define global variable persistent Define persistent variable mfilename Name of currently executing M-file lists Comma separated lists exist Check if variables or functions defined isglobal True for global variables (obsolete) mlock Prevent M-file from being cleared munlock Allow M-file to be cleared mislocked True if M-file cannot be cleared precedence Operator precedence in MATLAB isvarname Check for a valid variable name iskeyword Check if input is a keyword javachk Validate level of Java support genvarname MATLAB variable name from string

Argument handling nargchk Validate number of input arguments nargoutchk Validate number of 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 inputname Input argument name

Message display and interactive input warning Display warning message lasterr Last error message lastwarn Last warning message disp Display array display Display array intwarning Controls state of the 4 integer warnings input Prompt for user input keyboard Invoke keyboard from M-file

Frequency spacing for frequency response

True if arrays are numerically equal (assuming nan==nan)

Array utility functions isscalar True for scalar isvector True for vector

Matrix manipulation cat Concatenate arrays reshape Change size diag Diagonal matrices; diagonals of matrix blkdiag Block diagonal concatenation tril Extract lower triangular part triu Extract upper triangular part fliplr Flip matrix in left/right direction flipud Flip matrix in up/down direction flipdim Flip matrix along specified dimension rot90 Rotate matrix 90 degrees : Regularly spaced vector and array index find Find indices of nonzero elements end Last index sub2ind Linear index from multiple subscripts ind2sub Multiple subscripts from linear index ndgrid Arrays of N-D functions & interpolation permute Permute array dimensions ipermute Inverse permute array dimensions shiftdim Shift dimensions circshift Shift array circularly squeeze Remove singleton dimensions

Special variables and constants ans Most recent answer eps Floating-point relative accuracy realmax Largest positive floating-point number realmin Smallest positive floating-point number pi 3.1415926535897... i, j Imaginary unit inf Infinity nan Not-a-Number isnan True for Not-a-Number isinf True for infinite elements isfinite True for finite elements

Specialized matrices compan Companion matrix gallery Higham test matrices hadamard Hadamard matrix hankel Hankel matrix hilb Hilbert matrix invhilb Inverse Hilbert matrix magic Magic square pascal Pascal matrix rosser Symmetric eigenvalue test problem toeplitz Toeplitz matrix vander Vandermonde matrix wilkinson Wilkinson’s eigenvalue test matrix

22.5 Elementary math functions help elfun

Trigonometric (also continued on next page) sin Sine sind Sine of argument in degrees sinh Hyperbolic sine asin Inverse sine asind Inverse sine, result in degrees asinh Inverse hyperbolic sine cos Cosine cosd Cosine of argument in degrees cosh Hyperbolic cosine acos Inverse cosine acosd Inverse cosine, result in degrees acosh Inverse hyperbolic cosine tan Tangent tand Tangent of argument in degrees tanh Hyperbolic tangent atan Inverse tangent atand Inverse tangent, result in degrees atan2 Four quadrant inverse tangent

Trigonometric (continued) atanh Inverse hyperbolic tangent sec Secant secd Secant of argument in degrees sech Hyperbolic secant asec Inverse secant asecd Inverse secant, result in degrees asech Inverse hyperbolic secant csc Cosecant cscd Cosecant of argument in degrees csch Hyperbolic cosecant acsc Inverse cosecant acscd Inverse cosecant, result in degrees acsch Inverse hyperbolic cosecant cot Cotangent cotd Cotangent of argument in degrees coth Hyperbolic cotangent acot Inverse cotangent acotd Inverse cotangent, result in degrees acoth Inverse hyperbolic cotangent

Exponential exp Exponential expm1 Compute exp(x)-1 accurately log Natural logarithm log1p Compute log(1+x) accurately log10 Common (base 10) logarithm log2 Base 2 logarithm, dissect floating-point pow2 Base 2 power, scale floating-point realpow Array power with real result (or error) reallog Natural logarithm of real number realsqrt Square root of number ≥ 0 sqrt Square root nthroot Real nth root of real numbers nextpow2 Next higher power of 2

Complex abs Absolute value angle Phase angle complex Complex from real and imaginary parts conj Complex conjugate imag Complex imaginary part real Complex real part unwrap Unwrap phase angle isreal True for real array cplxpair Sort into complex conjugate pairs

Rounding and remainder fix Round towards zero floor Round towards minus infinity ceil Round towards plus infinity round Round towards nearest integer mod Modulus (remainder after division) rem Remainder after division sign Signum

22.6 Specialized math functions help specfun

Number theoretic functions factor Prime factors isprime True for prime numbers primes Generate list of prime numbers gcd Greatest common divisor lcm Least common multiple rat Rational approximation rats Rational output perms All possible permutations nchoosek All combinations of N choose K factorial Factorial function

Bessel function of 3rd kind (Hankel function)

Coordinate transforms cart2sph Cartesian to spherical coordinates cart2pol Cartesian to polar coordinates pol2cart Polar to Cartesian coordinates sph2cart Spherical to Cartesian coordinates hsv2rgb Convert HSV colors to RGB rgb2hsv Convert RGB colors to HSV

Matrix analysis norm Matrix or vector norm normest Estimate the matrix 2-norm rank Matrix rank det Determinant trace Sum of diagonal elements null Null space orth Orthogonalization rref Reduced row echelon form subspace Angle between two subspaces

Linear equations \ and / Linear equation solution (help slash) linsolve Linear equation solution, extra control inv Matrix inverse rcond LAPACK reciprocal condition estimator cond Condition number condest 1-norm condition number estimate normest1 1-norm estimate chol Cholesky factorization cholinc Incomplete Cholesky factorization lu LU factorization luinc Incomplete LU factorization qr Orthogonal-triangular decomposition lsqnonneg Linear least squares (≥ 0 constraints) pinv Pseudoinverse lscov Least squares with known covariance

Eigenvalues and singular values eig Eigenvalues and eigenvectors svd Singular value decomposition gsvd Generalized singular value decomp. eigs A few eigenvalues svds A few singular values poly Characteristic polynomial polyeig Polynomial eigenvalue problem condeig Condition number of eigenvalues hess Hessenberg form qz QZ factoriz. for generalized eigenvalues ordqz Reordering of eigenvalues in QZ schur Schur decomposition ordschur Sort eigenvalues in Schur decomposition

Matrix functions expm Matrix exponential logm Matrix logarithm sqrtm Matrix square root funm Evaluate general matrix function

Factorization utilities qrdelete Delete column from QR factorization qrinsert Insert column in QR factorization rsf2csf Real block diagonal to complex diagonal cdf2rdf Complex diagonal to real block diagonal balance Diagonal scaling for eigenvalue accuracy planerot Givens plane rotation cholupdate rank 1 update to Cholesky factorization qrupdate rank 1 update to QR factorization

22.8 Data analysis, Fourier transforms help datafun

Basic operations max Largest component min Smallest component mean Average or mean value median Median value std Standard deviation var Variance sort Sort in ascending order sortrows Sort rows in ascending order sum Sum of elements prod Product of elements hist Histogram histc Histogram count trapz Trapezoidal numerical integration cumsum Cumulative sum of elements cumprod Cumulative product of elements cumtrapz Cumulative trapezoidal num. integration

Finite differences diff Difference and approximate derivative gradient Approximate gradient del2 Discrete Laplacian

Correlation corrcoef Correlation coefficients cov Covariance matrix subspace Angle between subspaces

Filtering and convolution filter One-dimensional digital filter filter2 Two-dimensional digital filter conv Convolution, polynomial multiplication conv2 Two-dimensional convolution convn N-dimensional convolution deconv Deconvolution and polynomial division detrend Linear trend removal

Fourier transforms fft Discrete Fourier transform fft2 2-D discrete Fourier transform fftn N-D discrete Fourier transform ifft Inverse discrete Fourier transform ifft2 2-D inverse discrete Fourier transform ifftn N-D inverse discrete Fourier transform fftshift Shift zero-freq. component to center ifftshift Inverse fftshift

22.9 Interpolation and polynomials help polyfun

Data interpolation pchip Piecewise cubic Hermite interpol. poly. interp1 1-D interpolation (table lookup) interp1q Quick 1-D linear interpolation interpft 1-D interpolation using FFT method interp2 2-D interpolation (table lookup) interp3 3-D interpolation (table lookup) interpn N-D interpolation (table lookup) griddata 2-D data gridding and surface fitting griddata3 3-D data gridding & hypersurface fitting griddatan N-D data gridding &hypersurface fitting

Spline interpolation spline Cubic spline interpolation ppval Evaluate piecewise polynomial

Geometric analysis delaunay Delaunay triangulation delaunay3 3-D Delaunay tessellation delaunayn N-D Delaunay tessellation dsearch Search Delaunay triangulation dsearchn Search N-D Delaunay tessellation tsearch Closest triangle search tsearchn N-D closest triangle search convhull Convex hull convhulln N-D convex hull voronoi Voronoi diagram voronoin N-D Voronoi diagram inpolygon True for points inside polygonal region rectint Rectangle intersection area polyarea Area of polygon

Polynomials roots Find polynomial roots poly Convert roots to polynomial polyval Evaluate polynomial polyvalm Evaluate polynomial (matrix argument) residue Partial-fraction expansion (residues) polyfit Fit polynomial to data polyder Differentiate polynomial polyint Integrate polynomial analytically conv Multiply polynomials deconv Divide polynomials

22.10 Function functions and ODEs help funfun

Multidimensional unconstrained nonlinear minimization (Nelder-Mead)

Optimization option handling optimset Set optimization options structure optimget Get optimization parameters

Numerical integration, high order method

Plotting ezplot Easy-to-use function plotter ezplot3 Easy-to-use 3-D parametric curve plotter ezpolar Easy-to-use polar coordinate plotter ezcontour Easy-to-use contour plotter ezcontourf Easy-to-use filled contour plotter ezmesh Easy-to-use 3-D mesh plotter ezmeshc Easy-to-use mesh/contour plotter ezsurf Easy-to-use 3-D colored surface plotter ezsurfc Easy-to-use surf/contour plotter fplot Plot function

Inline function object inline Construct inline function object argnames Argument names formula Function formula char Convert inline object to char array

Solve non-stiff differential equations, medium order method (Try this first)

Solve moderately stiff ODEs and DAEs Index 1, trapezoidal rule

ode15s Solve stiff ODEs and DAEs Index 1, variable order method

Initial value problem, fully implicit ODEs/DAEs decic Compute consistent initial conditions ode15i Solve implicit ODEs or DAEs Index 1

Initial value problem solvers for DDEs dde23 Solve delay differential equations

Boundary value problem solver for ODEs bvp4c Solve two-point boundary value ODEs

1-D Partial differential equation solver pdepe Solve initial-boundary value PDEs

ODE, DDE, BVP option handling odeset Create/alter ODE options structure odeget Get ODE options parameters ddeset Create/alter DDE options structure ddeget Get DDE options parameters bvpset Create/alter BVP options structure bvpget Get BVP options parameters

ODE, DAE, DDE, PDE input & output functions deval Evaluate solution of differential equation odextend Extend solutions of differential equation odeplot Time series ODE output function odephas2 2-D phase plane ODE output function odephas3 3-D phase plane ODE output function odeprint ODE output function bvpinit Forms the initial guess for bvp4c pdeval Evaluates solution computed by pdepe

22.11 Sparse matrices help sparfun

Elementary sparse matrices speye Sparse identity matrix sprand Uniformly distributed random matrix sprandn Normally distributed random matrix sprandsym Sparse random symmetric matrix spdiags Sparse matrix formed from diagonals

Full to sparse conversion sparse Create sparse matrix full Convert sparse matrix to full matrix find Find indices of nonzero elements spconvert Create sparse matrix from triplets

Working with sparse matrices nnz Number of nonzero matrix elements nonzeros Nonzero matrix elements nzmax Space allocated for nonzero elements spones Replace nonzero elements with ones spalloc Allocate space for sparse matrix issparse True for sparse matrix spfun Apply function to nonzero elements spy Visualize sparsity pattern

Reordering algorithms colamd Column approximate minimum degree symamd Approximate minimum degree symrcm Symmetric reverse Cuthill-McKee colperm Column permutation randperm Random permutation dmperm Dulmage-Mendelsohn permutation lu UMFPACK reordering (with 4 outputs)

Linear algebra eigs A few eigenvalues, using ARPACK svds A few singular values, using eigs luinc Incomplete LU factorization cholinc Incomplete Cholesky factorization normest Estimate the matrix 2-norm condest 1-norm condition number estimate sprank Structural rank

Linear equations (iterative methods) pcg Preconditioned conjugate gradients bicg Biconjugate gradients method bicgstab Biconjugate gradients stabilized method cgs Conjugate gradients squared method gmres Generalized minimum residual method lsqr Conjugate gradients on normal equations minres Minimum residual method qmr Quasi-minimal residual method symmlq Symmetric LQ method

Operations on graphs (trees) treelayout Lay out tree or forest treeplot Plot picture of tree etree Elimination tree etreeplot Plot elimination tree gplot Plot graph, as in “graph theory”

Miscellaneous symbfact Symbolic factorization analysis spparms Set parameters for sparse matrix routines spaugment Form least squares augmented system

22.12 Annotation and plot editting help scribe

Graph annotation annotation Create annotation objects for figures colorbar Display coloar bar (color scale) legend Graph legend

22.13 Two-dimensional graphs help graph2d

Elementary x-y graphs plot Linear plot loglog Log-log scale plot semilogx Semi-log scale plot semilogy Semi-log scale plot polar Polar coordinate plot plotyy Graphs with y tick labels on left & right

Axis control axis Control axis scaling and appearance zoom Zoom in and out on a 2-D plot grid Grid lines box Axis box hold Hold current graph axes Create axes in arbitrary positions subplot Create axes in tiled positions

Hard copy and printing print Print graph, Simulink sys.; save to M-file printopt Printer defaults orient Set paper orientation

Graph annotation plotedit Tools for editing and annotating plots title Graph title xlabel x-axis label ylabel y-axis label texlabel TeX format from string text Text annotation gtext Place text with mouse

22.14 Three-dimensional graphs help graph3d

Elementary 3-D plots plot3 Plot lines and points in 3-D space mesh 3-D mesh surface surf 3-D colored surface fill3 Filled 3-D polygons

Color control colormap Color look-up table caxis Pseudocolor axis scaling shading Color shading mode hidden Mesh hidden line removal mode brighten Brighten or darken color map colordef Set color defaults graymon Graphics defaults for grayscale monitors

Lighting surfl 3-D shaded surface with lighting lighting Lighting mode material Material reflectance mode specular Specular reflectance diffuse Diffuse reflectance surfnorm Surface normals

Color maps hsv Hue-saturation-value color map hot Black-red-yellow-white color map gray Linear grayscale color map bone Grayscale with tinge of blue color map copper Linear copper-tone color map pink Pastel shades of pink color map white All-white color map flag Alternating red, white, blue, and black lines Color map with the line colors colorcube Enhanced color-cube color map vga Windows colormap for 16 colors jet Variant of HSV prism Prism color map cool Shades of cyan and magenta color map autumn Shades of red and yellow color map spring Shades of magenta and yellow color map winter Shades of blue and green color map summer Shades of green and yellow color map

Axis control axis Control axis scaling and appearance zoom Zoom in and out on a 2-D plot grid Grid lines box Axis box hold Hold current graph axes Create axes in arbitrary positions subplot Create axes in tiled positions daspect Data aspect ratio pbaspect Plot box aspect ratio xlim x limits ylim y limits zlim z limits

Transparency alpha Transparency (alpha) mode alphamap Transparency (alpha) look-up table alim Transparency (alpha) scaling

Viewpoint control view 3-D graph viewpoint specification viewmtx View transformation matrix rotate3d Interactively rotate view of 3-D plot

Camera control campos Camera position camtarget Camera target camva Camera view angle camup Camera up vector camproj Camera projection

High-level camera control camorbit Orbit camera campan Pan camera camdolly Dolly camera camzoom Zoom camera camroll Roll camera camlookat Move camera and target to view objects cameratoolbar Interactively manipulate camera

High-level light control camlight Creates or sets position of a light lightangle Spherical position of a light

Hard copy and printing print Print graph, Simulink sys.; save to M-file printopt Printer defaults orient Set paper orientation vrml Save graphics to VRML 2.0 file

Graph annotation title Graph title xlabel x-axis label ylabel y-axis label zlabel z-axis label text Text annotation gtext Mouse placement of text plotedit Graph editing and annotation tools

22.15 Specialized graphs help specgraph

Specialized 2-D graphs area Filled area plot bar Bar graph barh Horizontal bar graph comet Comet-like trajectory compass Compass plot errorbar Error bar plot ezplot Easy-to-use function plotter ezpolar Easy-to-use polar coordinate plotter feather Feather plot fill Filled 2-D polygons fplot Plot function hist Histogram pareto Pareto chart pie Pie chart plotmatrix Scatter plot matrix rose Angle histogram plot scatter Scatter plot stem Discrete sequence or “stem” plot stairs Stairstep plot

Contour and 2½-D graphs contour Contour plot contourf Filled contour plot contour3 3-D contour plot clabel Contour plot elevation labels ezcontour Easy-to-use contour plotter ezcontourf Easy-to-use filled contour plotter pcolor Pseudocolor (checkerboard) plot voronoi Voronoi diagram

Specialized 3-D graphs bar3 3-D bar graph bar3h Horizontal 3-D bar graph comet3 3-D comet-like trajectories ezgraph3 General-purpose surface plotter ezmesh Easy-to-use 3-D mesh plotter ezmeshc Easy-to-use mesh/contour plotter ezplot3 Easy-to-use 3-D parametric curve plotter ezsurf Easy-to-use 3-D colored surface plotter ezsurfc Easy-to-use surf/contour plotter meshc Combination mesh/contour plot meshz 3-D mesh with curtain pie3 3-D pie chart ribbon Draw 2-D lines as ribbons in 3-D scatter3 3-D scatter plot stem3 3-D stem plot surfc Combination surf/contour plot trisurf Triangular surface plot trimesh Triangular mesh plot waterfall Waterfall plot

Color-related functions spinmap Spin color map rgbplot Plot color map colstyle Parse color and style from string ind2rgb Convert indexed image to RGB image

Volume and vector visualization vissuite Visualization suite isosurface Isosurface extractor isonormals Isosurface normals isocaps Isosurface end caps isocolors Isosurface and patch colors contourslice Contours in slice planes slice Volumetric slice plot streamline Streamlines from 2-D or 3-D vector data stream3 3-D streamlines stream2 2-D streamlines quiver3 3-D quiver plot quiver 2-D quiver plot divergence Divergence of a vector field curl Curl and angular velocity of vector field coneplot 3-D cone plot streamtube 3-D stream tube streamribbon 3-D stream ribbon streamslice Streamlines in slice planes streamparticles Display stream particles interpstreamspeed Interpolate streamlines from speed subvolume Extract subset of volume dataset reducevolume Reduce volume dataset volumebounds Returns x,y,z, & color limits for volume smooth3 Smooth 3-D data reducepatch Reduce number of patch faces shrinkfaces Reduce size of patch faces

Movies and animation moviein Initialize movie frame memory getframe Get movie frame movie Play recorded movie frames rotate Rotate about specified orgin & direction frame2im Convert movie frame to indexed image im2frame Convert index image into movie format

Image display and file I/O image Display image imagesc Scale data and display as image colormap Color look-up table gray Linear grayscale color map contrast Grayscale color map to enhance contrast brighten Brighten or darken color map colorbar Display color bar (color scale) imread Read image from graphics file imwrite Write image to graphics file imfinfo Information about graphics file im2java Convert image to Java image

Solid modeling cylinder Generate cylinder sphere Generate sphere ellipsoid Generate ellipsoid patch Create patch surf2patch Convert surface data to patch data

22.16 Handle Graphics help graphics

Figure window creation and control figure Create figure window gcf Get handle to current figure clf Clear current figure shg Show graph window close Close figure refresh Refresh figure refreshdata Refresh data plotted in figure openfig Open new or raise copy of saved figure

Axis creation and control subplot Create axes in tiled positions axes Create axes in arbitrary positions gca Get handle to current axes cla Clear current axes axis Control axis scaling and appearance box Axis box caxis Control pseudocolor axis scaling hold Hold current graph ishold Return hold state

Handle Graphics objects figure Create figure window axes Create axes line Create line text Create text patch Create patch rectangle Create rectangle or ellipse surface Create surface image Create image light Create light uicontrol Create user interface control uimenu Create user interface menu uicontextmenu Create user interface context menu

Hard copy and printing print Print graph, Simulink sys.; save to M-file printopt Printer defaults orient Set paper orientation

Utilities closereq Figure close request function newplot M-file preamble for NextPlot property ishandle True for graphics handles

Handle Graphics operations set Set object properties get Get object properties reset Reset object properties delete Delete object gco Get handle to current object gcbo Get handle to current callback object gcbf Get handle to current callback figure drawnow Flush pending graphics events findobj Find objects w/ specified property values copyobj Copy graphics object and its children isappdata Check if application-defined data exists getappdata Get value of application-defined data setappdata Set application-defined data rmappdata Remove application-defined data

22.17 Graphical user interface tools help uitools

GUI functions uicontrol Create user interface control uimenu Create user interface menu ginput Graphical input from mouse dragrect Drag XOR rectangles with mouse rbbox Rubberband box selectmoveresize Select, move, resize, copy objects waitforbuttonpress Wait for key/buttonpress waitfor Block execution and wait for event uiwait Block execution and wait for resume uiresume Resume execution of blocked M-file uistack Control stacking order of objects uisuspend Suspend the interactive state of a figure uirestore Restore the interactive state of a figure

GUI design tools guide Design GUI inspect Inspect object properties align Align uicontrols and axes propedit Edit property

Dialog boxes axlimdlg Axes limits dialog box dialog Create dialog figure errordlg Error dialog box helpdlg Help dialog box imageview Show image preview in a figure window inputdlg Input dialog box listdlg List selection dialog box menu Generate menu of choices for user input movieview Show movie in figure with replay button msgbox Message box pagedlg Page position dialog box pagesetupdlg Page setup dialog printdlg Print dialog box printpreview Display preview of figure to be printed questdlg Question dialog box soundview Show sound in figure and play uigetpref Question dialog box with preference uigetfile Standard open file dialog box uiputfile Standard save file dialog box uigetdir Standard open directory dialog box uisetcolor Color selection dialog box uisetfont Font selection dialog box uiopen Show open file dialog and call open uisave Show open file dialog and call save uiload Show open file dialog and call load waitbar Display wait bar warndlg Warning dialog box

Menu utilities makemenu Create menu structure menubar Default setting for MenuBar property umtoggle Toggle checked status of uimenu object winmenu Create submenu for Window menu item

Toolbar button group utilities btngroup Create toolbar button group btnresize Resize button group btnstate Query state of toolbar button group btnpress Button press manager btndown Depress button in toolbar button group btnup Raise button in toolbar button group

Miscellaneous utilities allchild Get all object children clipboard Copy/paste to/from system clipboard edtext Interactive editing of axes text objects findall Find all objects findfigs Find figures positioned off screen getptr Get figure pointer getstatus Get status text string in figure hidegui Hide/unhide GUI listfonts Get list of available system fonts movegui Move GUI to specified part of screen guihandles Return a structure of handles guidata Store or retrieve application data overobj Get handle of object the pointer is over popupstr Get popup menu selection string remapfig Transform figure objects’ positions setptr Set figure pointer setstatus Set status text string in figure uiclearmode Clears currently active interactive mode

Preferences addpref Add preference getpref Get preference rmpref Remove preference setpref Set preference ispref Test for existence of preference

22.18 Character strings help strfun

General char Create character array (string) strings Help for strings cellstr Cell array of strings from char array blanks String of blanks deblank Remove trailing blanks

String tests iscellstr True for cell array of strings ischar True for character array (string) isspace True for white space characters isstrprop Check category of string elements

Character set conversion native2unicode Convert bytes to Unicode characters unicode2native Convert Unicode characters to bytes

String to number conversion num2str Convert number to string int2str Convert integer to string mat2str Convert matrix to eval’able string str2double Convert string to double-precision value str2num Convert string matrix to numeric array sprintf Write formatted data to string sscanf Read string under format control

String operations regexp Match regular expression regexpi Match regular expression, ignoring case regexprep Replace string using regular expression strcat Concatenate strings strvcat Vertically concatenate strings strcmp Compare strings strncmp Compare first N characters of strings strcmpi Compare strings ignoring case strncmpi Compare first N characters, ignore case strread Read formatted data from string strtrim Remove insignificant whitespace findstr Find one string within another strfind Find one string within another strjust Justify character array strmatch Find possible matches for string strrep Replace string with another strtok Find token in string upper Convert string to uppercase lower Convert string to lowercase

Base number conversion hex2num IEEE hexadecimal to double-precision hex2dec hexadecimal string to decimal integer dec2hex decimal integer to hexadecimal string bin2dec Convert binary string to decimal integer dec2bin Convert decimal integer to binary string base2dec Convert base B string to decimal integer dec2base Convert decimal integer to base B string num2hex single and double to IEEE hexadecimal

22.19 Image and scientific data help imagesci

Image file import/export imformats List details about supported file formats imfinfo Return information about graphics file imread Read image from graphics file imwrite Write image to graphics file im2java Convert image to Java image multibandread Read band-interleaved data from a file multibandwrite Write multiband data to a file

CDF file handling cdfread Read data from a CDF file cdfinfo Get information from a CDF file cdfwrite Write data to a CDF file cdfepoch Construct cdfepoch object

FITS file handling fitsinfo Get information from a FITS file fitsread Read data from a FITS file

HDF version 4 file handling hdfinfo Get information about an HDF4 file hdfread Read HDF4 file hdftool Browse/import HDF4 or HDF-EOS files

HDF version 5 file handling hdf5info Get information about an HDF5 file hdf5read Read data and attributes from HDF5 file hdf5write Write data and attributes to HDF5 file

HDF version 5 data objects hdf5.h5array Construct HDF5 array hdf5.h5compound Construct HDF5 compound object hdf5.h5enum Construct HDF5 enumeration object hdf5.h5string Construct HDF5 string hdf5.h5vlen Construct HDF5 variable length array

HDF version 4 library interface hdf MEX-file interface to the HDF library hdfan HDF multifile annotation interface hdfdf24 HDF raster image interface hdfdfr8 HDF 8-bit raster image interface hdfh HDF H interface hdfhe HDF HE interface hdfhx HDF HX interface hdfml MATLAB-HDF gateway utilities hdfsd HDF multifile scientific dataset interface hdfv HDF V (Vgroup) interface hdfvf HDF VF (Vdata) interface hdfvh HDF VH (Vdata) interface hdfvs HDF VS (Vdata) interface

HDF-EOS library interface help hdfgd HDF-EOS grid interface hdfpt HDF-EOS point interface hdfsw HDF-EOS swath interface

22.20 File input/output help iofun

File import/export functions dlmread Read ASCII delimited text file dlmwrite Write ASCII delimited text file importdata Load data from a file into MATLAB daqread Read Data Acquisition Toolbox daq file matfinfo Text description of MAT-file contents

Internet resource urlread Read URL contents as a string urlwrite Save URL contents to a file ftp Create an ftp object sendmail Send e-mail

Spreadsheet support xlsread Read Excel (xls) workbook xlswrite Write to Excel (xls) workbook xlsfinfo Check if file contains Excel workbook wk1read Read Lotus spreadsheet (wk1) file wk1write Write Lotus spreadsheet (wk1) file wk1finfo Check if file contains Lotus worksheet str2rng Convert range string to numeric array wk1wrec Write a Lotus worksheet record header

Zip file access zip Compress files in a zip file unzip Extract contents of a zip file

Formatted file I/O fgetl Read line from file, discard newline char fgets Read line from file, keep newline char. fprintf Write formatted data to file fscanf Read formatted data from text file textscan Read formatted data from text file textread Read formatted data from text file

File opening and closing fopen Open file fclose Close file

Binary file I/O fread Read binary data from file fwrite Write binary data to file

File positioning feof Test for end-of-file ferror Inquire file error status frewind Rewind file fseek Set file position indicator ftell Get file position indicator

File name handling fileparts Filename parts filesep Directory separator for this platform fullfile Build full filename from parts matlabroot Root directory of MATLAB installation mexext MEX filename extension partialpath Partial pathnames pathsep Path separator for this platform prefdir Preference directory name tempdir Get temporary directory tempname Get temporary file

XML file handling xmlread Parse an XML document xmlwrite Serialize XML Document Object Model xslt Transform XML document via XSLT

Serial port support serial Construct serial port object instrfindall Find all serial port objects freeserial Release serial port instrfind Find serial port objects

Timer support timer Construct timer object timerfindall Find all timer objects timerfind Find visible timer objects

Command window I/O clc Clear Command window home Send cursor home

SOAP support callSoapService Send a SOAP message createSoapMessage Create a SOAP message parseSoapResponse Convert SOAP message response

22.21 Audio and video support help audiovideo

Audio input/output objects audioplayer Audio player object audiorecorder Audio recorder object

Audio hardware drivers sound Play vector as sound soundsc Autoscale and play vector as sound wavplay Play on Windows audio output device wavrecord Record from Windows audio input

Audio file import and export aufinfo Return information about au file auread Read NeXT/SUN (.au) sound file auwrite Write NeXT/SUN (.au) sound file wavfinfo Return information about wav file wavread Read Microsoft (.wav) sound file wavwrite Write Microsoft (.wav) sound file

Video file import/export aviread Read movie (.avi) file aviinfo Return information about avi file avifile Create a new avi file movie2avi Make avi movie from MATLAB movie

Utilities lin2mu Convert linear signal to mu-law encoding mu2lin Convert mu-law encoding to linear signal

Example audio data (MAT files) chirp Frequency sweeps gong Gong handel Hallelujah chorus laughter Laughter from a crowd splat Chirp followed by a splat train Train whistle

22.22 Time and dates help timefun

Current date and time now Current date and time as date number date Current date as date string clock Current date and time as date vector

Basic functions datenum Serial date number datestr String representation of date datevec Date components

Date functions calendar Calendar weekday Day of week eomday End of month datetick Date formatted tick labels

Timing functions cputime CPU time in seconds tic Start stopwatch timer toc Stop stopwatch timer etime Elapsed time pause Wait in seconds

22.23 Data types and structures help datatypes

Class determination functions isnumeric True for numeric arrays isfloat True for single and double arrays isinteger True for integer arrays islogical True for logical arrays ischar True for char arrays (string)

Data types (classes) double Convert to double precision char Create character array (string) logical Convert numeric values to logical cell Create cell array struct Create or convert to structure array single Convert to single precision int8 Convert to signed 8-bit integer int16 Convert to signed 16-bit integer int32 Convert to signed 32-bit integer int64 Convert to signed 64-bit integer uint8 Convert to unsigned 8-bit integer uint16 Convert to unsigned 16-bit integer uint32 Convert to unsigned 32-bit integer uint64 Convert to unsigned 64-bit integer inline Construct inline object function_handle Function handle (@ operator) javaArray Construct a Java array javaMethod Invoke a Java method javaObject Invoke a Java object constructor

Multidimensional array functions cat Concatenate arrays ndims Number of dimensions ndgrid Arrays for N-D functions & interpolation permute Permute array dimensions ipermute Inverse permute array dimensions shiftdim Shift dimensions squeeze Remove singleton dimensions

Cell array functions cell Create cell array cellfun Functions on cell array contents celldisp Display cell array contents cellplot Display graphical depiction of cell array cell2mat Combine cell array of matrices mat2cell Break matrix into cell array of matrices num2cell Convert numeric array into cell array deal Deal inputs to outputs cell2struct Convert cell array into structure array struct2cell Convert structure array into cell array iscell True for cell array

Structure functions struct Create or convert to structure array fieldnames Get structure field names getfield Get structure field contents setfield Set structure field contents rmfield Remove structure field isfield True if field is in structure array isstruct True for structures orderfields Order fields of a structure array

Object-oriented programming functions class Create object or return object class struct Convert object to structure array methods List names & properties of class methods methodsview List names & properties of class methods isa True if object is a given class isjava True for Java objects isobject True for MATLAB objects inferiorto Inferior class relationship superiorto Superior class relationship substruct Create structure for subsref/subasgn

Overloadable operators minus Overloadable method for a-b plus Overloadable method for a+b times Overloadable method for a.*b mtimes Overloadable method for a*b mldivide Overloadable method for a\b mrdivide Overloadable method for a/b rdivide Overloadable method for a./b ldivide Overloadable method for a.\b power Overloadable method for a.^b mpower Overloadable method for a^b uminus Overloadable method for -a uplus Overloadable method for +a horzcat Overloadable method for [a b] vertcat Overloadable method for [a;b] le Overloadable method for a<=b lt Overloadable method for a<b gt Overloadable method for a>b ge Overloadable method for a>=b eq Overloadable method for a==b ne Overloadable method for a~=b not Overloadable method for ~a and Overloadable method for a&b or Overloadable method for a|b subsasgn for a(i)=b, a{i}=b, and a.field=b subsref for a(i), a{i}, and a.field colon Overloadable method for a:b end Overloadable method for a(end) transpose Overloadable method for a.' ctranspose Overloadable method for a' subsindex Overloadable method for x(a) loadobj Called to load object from .mat file saveobj Called to save object to .mat file

22.24 Version control help verctrl

Checkin/checkout checkin checkin files to version control system checkout checkout files undocheckout undo checkout files

Specific version control rcs Version control actions using RCS pvcs Version control actions using PVCS clearcase Version control actions using ClearCase sourcesafe Version control using Visual SourceSafe customverctrl Custom version control template verctrl Version control operations on Windows cmpopts Version control settings

22.25 Creating and debugging code help codetools

Writing and managing M-files edit Edit M-file notebook Open an M-book in Microsoft Word mlint List suspicious constructs in M-files

Directory tools contentsrpt Audit Contents.m of a directory coveragerpt Scan directory for profiler line coverage deprept Scan file or directory for dependencies diffrpt Directory browser and file comparitor dofixrpt Scan file or directory for TODO, ... helprpt Scan file or directory for help mlintrpt Scan file or directory for M-lint info. standardrpt Directory browser

Managing the file system and search patch filebrowser Open Current Directory browser pathtool View, modify, & save MATLAB path

Profiling M-files profile Profile function execution time profview Profile browser profsave Save static copy of profile report profreport Generate profile report profviewgateway Profiler HTML gateway function opentoline Start editting a file at a given line stripanchors Remove code evaluation anchors

Managing, watching, and editting variables openvar Open workspace for graphical editting workspace View contents of a workspace

22.26 Help commands help helptools

Accessing on-line HTML help doc Bring up Help Browser to specific place helpbrowser Same as doc, to last place viewed helpdesk Same as doc, to help “Begin Here” page helpview Display HTML file in Help Browser docsearch Search in Help Browser

Accessing M-file help help View M-file help in Command window helpwin View M-file help in Help Browser lookfor Search all M-files for keyword

MathWorks tech support, web access info Info about MATLAB & The MathWorks support Open MathWorks tech support web page whatsnew View Release Notes in Help Browser web Open internal or system web browser

22.27 Microsoft Windows functions help winfun

COM automation client functions actxcontrol Create an ActiveX control actxserver Create an ActiveX server eventlisteners Lists all registered events isevent True if event of object registerevent Registers events unregisterallevents Unregister all events unregisterevent Unregister events iscom True if COM/ActiveX object isinterface True if COM interface COM/set Set COM object property COM/get Get COM object properties COM/invoke Invoke/display method COM/events List COM object events COM/interfaces List custom interfaces COM/addproperty Add custom property to object COM/deleteproperty Remove custom property COM/delete Delete COM object COM/release Release COM interface COM/move Move/resize ActiveX control COM/propedit Edit properties

COM automation client functions (continued) COM/save Serialize COM object to file COM/load Initialize COM object from file

COM sample code mwsamp ActiveX control creation sampev Event handler

DDE client functions ddeadv Setup advisory link ddeexec Execute string ddeinit Initiate DDE conversation ddepoke Send data to application ddereq Request data from application ddeterm Terminate DDE conversation ddeunadv Release advisory link

General MS Windows functions winopen Open file using Windows command winqueryreg Read Windows registry

22.28 Examples and demonstrations Type help demos to see a list of MATLAB demos.