exist
Check for the existence.
Syntax
res = exist(name)
res = exist(name, category)
Input argument
name - a string: name of variable, function, file or directory.
category - a string: 'var', 'builtin', 'file', or 'dir'.
Output argument
res - a integer value.
Description
exists checks for the existence of variable, builtin, file or directory.
exists returns:
0 does not exist
1 is an variable
2 is a file
3 is a mex function
5 is a builtin or function
7 is a directory
Example
See also
isbuiltin, ismacro, isfile, isdir, isvar.
History
Version
Description
1.0.0
initial version
Author
Allan CORNET
Last updated