| MATLAB Function Reference | Search  Help Desk |
| what | Examples See Also |
List M-files, MAT-files, and MEX-files in current directory
Syntax
what
what dirname
what('dirname')
Description
what
lists the M-files, MAT-files, and MEX-files in the current directory.
what dirname
lists the files in directory dirname on MATLAB's search path. It is not necessary to enter the full pathname of the directory. The last component, or last couple of components, is sufficient. Use what class or what dirname/private to list the files in a method directory or a private directory (for the class named class).
w = what('dirname')
returns the results of what in a structure array with these fields.Examples
The statementswhat generaland
what matlab/generalboth list the M-files in the
general directory. The syntax of the path depends on your operating system| UNIX | |
| VMS | |
| Windows | |
See Also
dir, lookfor, path, which, who