| MATLAB Functions | Help Desk |
exist
Check if a variable or file exists
a = exist('item')
ident = exist('item',kind)
a = exist('item')
returns the status of the variable or file item: exist('item') or exist('item.ext')returns 2 if item is on the MATLAB search path but the filename extension (ext) is not m, p, or mex. item may be a MATLABPATH relative partial pathname.
ident = exist('item','kind') returns logical true (1) if an item of the specified kind is found, and returns 0 otherwise. kind may be: exist can check whether a MATLAB function is built-in or a file:
ident = exist('plot')
ident =
5
plot is a built-in function.
dir Directory listing
help Online help for MATLAB functions and M-files
lookfor Keyword search through all help entries
what Directory listing of M-files, MAT-files, and MEX-files
which Locate functions and files
who List directory of variables in memory
See also partialpath.