| MATLAB Function Reference | Search  Help Desk |
| type | Examples See Also |
Syntax
type filename
Description
type filename
displays the contents of the specified file in the MATLAB command window given a full pathname or a MATLABPATH relative partial pathname. Use pathnames and drive designators in the usual way for your computer's operating system.
If you do not specify a filename extension, the type command adds the m extension by default. The type command checks the directories specified in MATLAB's search path, which makes it convenient for listing the contents of M-files on the screen.
Examples
type foo.bar lists the file foo.bar.
type foo lists the file foo.m.
See Also
cd, dbtype, delete, dir, partialpath, path, what, who