res = exist(name)
res = exist(name, category)
| Parameter | Description |
|---|---|
| name | a string: name of variable, function, file or directory. |
| category | a string: 'var', 'builtin', 'file', or 'dir'. |
| Parameter | Description |
|---|---|
| res | a integer value. |
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
exist('fileread')
fileread = 3;
exist('fileread')
clear fileread
exist('fileread')
| Version | Description |
|---|---|
| 1.0.0 | initial version |