File Types
MATLAB has three types of files for storing in formations:
M-files are standard ASCII text files, with a .m extension to the filename.
There are two types of these files: script files & function files. All built-in
functions in MATLAB are M-files, most of which reside in precompiled format in
computer.
An M-file, or script file, is a simple text file where you can place MATLAB
commands. When the files is run Matlab reads the commands and executes them
exactly as it would if you had typed each command sequentially at the Matlab
prompt.
All m-file names must end with the extension ‘.m’ (Eg. Plot.m). if you create a
new m-file with the same as an existing m-file, Matlab will choose the one which
appears first in the path order (help path for more information).
To make life easier, choose a name for your m-file which doesn’t already exist. To
see if a filename .m exists, types help filename at the Matlab prompt.
Mat-files are binary data-files, with a .mat extension to the filename. Mat
files are created by MATLAB when data is saved with save command. Mat-files
can be loaded in to MATLAB with the load command.
No comments:
Post a Comment