ABSTRACT

Many example scripts are included throughout the chapter to illustrate these various topics.

2.2 The MATLAB Windows Under Microsoft Windows, MATLAB may be started via the Start menu or clicking on the MATLAB icon on the desktop. On startup, a new window will open containing the MATLAB “desktop” (not to be confused with the Windows desktop), and one or more MATLAB windows will open within the desktop (see Figure 2.1 for the

Figure 2.1 MATLAB desktop windows. (From MATLAB, with permission.)

default con›guration). e main windows are the Command window, Command History, Current Folder, and Workspace. You can customize the MATLAB windows that appear on startup by opening the Desktop menu and checking (or unchecking) the windows that you wish to appear on the MATLAB desktop. Figure 2.1 shows the Command window (in the center), the Current Folder (on the left), the Workspace (on the top right), the Command History (on the bottom right), and the Current Folder box (in the icon toolbar, second from the top, just above the Command window). ese windows and the current folder box are summarized as follows:

◾ Command Window: In the Command window you can enter commands and data, make calculations, and print results. You can write a program in the Command window and execute the program. However, writing a program directly into the Command window is discouraged because it will not be saved, and if an error is made, the entire program must be retyped. By using the up arrow (↑) key on your keyboard, the previous command can be retrieved (and edited) for reexecution.