Notes 01: Introduction to MATLAB


Components of MATLAB's Desktop


Managing the Workspace

Some useful commands

Creating and using an "m-file"

While the interactive Command Window is convenient, we do not always want to restart from scratch or to have to retype a long series of commands. We can save a series of commands in a text file that is traditionally known as an "m-file" in MATLAB lingo (because it is saved using a filename such as myproject.m).

The percent sign is used in MATLAB to designate the remainder of any line as a comment. This provides a convenient way for documenting portions of your source code. For example, you might write

gravity = 9.8;       % measured in meters/second^2

Originally by
Michael Goldwasser