Display contents of file
If you do not specify a file extension and there is no filename file without an extension, the type function adds the .m extension by default. The type function checks the folders specified in the MATLAB search path, which makes it convenient for listing the contents of files on the screen. Use type with more on to see the listing one screen at a time.
type('foo.bar') lists the contents of the file foo.bar.
type foo lists the contents of the file foo. If foo does not exist, type foo lists the contents of the file foo.m.