5. Programming in Matlab

MATLAB is also a programming languange. By creating a file with the extension .m you can easily write and run programs. If you were to create a program file myfile.m in the MATLAB language, then you can call the command myfile from MATLAB and it will run like any other MATLAB function. If you are using a PC you will also need to set path if you are doing this for the first time, so that MATLAB can find your program. See note below in 5.1. There is no need to compile the program since MATLAB is an interpretative language. Such a file is called a m-file. We will describe the basic programming constructions. These should be enough to enable you to write clear programs.


Next Section: 5.1 Assignment


Created by F.G. Garvan (fgarvan@ufl.edu) on Tue, Sep 30, 97
Last update made Thu May 27 15:37:36 EDT 2004.
Back to 4. Colon Notation
Back to Table of Contents
EMAIL: fgarvan@ufl.edu fgarvan@ufl.edu