Using M-files in Matlab
A D V E R T I S E M E N T
There are slightly different things you need to know for each platform.
There is a built-in editor for m-files; choose "New M-file" from the File
menu. You can also use any other editor you like (but be sure to save the
files in text format and load them when you start Matlab).
Running Matlab from Windows is very similar to running it on a Macintosh.
However, you need to know that your m-file will be saved in the clipboard.
Therefore, you must make sure that it is saved as filename.m
You will need to run an editor separately from Matlab. The best strategy is
to make a directory for all your m-files, then cd to that directory before
running both Matlab and the editor. To start Matlab from your Xterm window,
simply type: matlab.
You can either type commands directly into matlab, or put all of the commands
that you will need together in an m-file, and just run the file. If you put all
of your m-files in the same directory that you run matlab from, then matlab will
always find them.