1.5. Types of Files

There are three different types of files in the MATLAB:

1.5.1. M-files

M-files are standard ASCII text files, with a (.m) extension to the filename. Any program written in a MATLAB editor is saved as M-files. These files are further classified as

1.5.1.1. Script Files

An M-file with a set of valid MATLAB commands is called a script file. To run a script file, the filename (without the .m extension) is entered in the Command Window, just as any other MATLAB command. This is similar to executing the commands written in the script file one by one. The script files work on global variables, that is, the variables currently present in the workspace. These may have any number ...

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.