In this book the name MATLAB® (short for Matrix Laboratory) will refer to:
matlabin Dos or Unix environments, or by clicking on its icon in a graphic environment such as x11, Windows, MacOS...,
MATLAB® is an interpreter, that is to say a program that remains in the computer’s memory once it is launched. MATLAB® displays a command window used for interpreting commands. If they are considered correct, MATLAB® will execute them. This execution will itself lead to verifications.
Example 1 (Direct interpretation) Type
<return>. The result is shown in a PC environment (Figure 1).
Commands can be gathered together in text files called matlab programs. The user gives them a name that can be called from the prompt line. The MATLAB® documentation explains how to use an editor to create such files. This editor may either be integrated in the software or kept external (the user’s favorite editor). Program files use the extension
.m. If a program is called
prog1.m, all the user has to do is type
prog1 in the MATLAB® command window to have it executed. MATLAB® then searches for the file in the routine directory. If it doesn’t find the file there, it looks for
prog1.m in the various files specified in ...