Page 22 - A Guide to MATLAB for Beginners and Experienced Users
P. 22

Typing in the Command Window            3


                     or Student MATLAB. Alternatively, you may have an icon set up that enables
                     you to start MATLAB witha simple double-click. On a UNIX machine, gen-
                     erally you need only type matlab in a terminal window, though you may first
                     have to find the matlab/bin directory and add it to your path. Or you may
                     have an icon or a special button on your desktop that achieves the task.

                   ➱ On UNIX systems, you should not attempt to run MATLAB in the
                       background by typing matlab &. This will fail in either the current
                       or older versions.
                       However you start MATLAB, you will briefly see a window that displays
                     the MATLAB logo as well as some MATLAB product information, and then a
                     MATLABDesktop window will launch. That window will contain a title bar, a
                     menu bar, a tool bar, and five embedded windows, two of which are hidden. The
                     largest and most important window is the Command Window on the right. We
                     will go into more detail in Chapter 3 on the use and manipulation of the other
                     four windows: the Launch Pad,the Workspace browser,the Command History
                     window, and the Current Directory browser. For now we concentrate on the
                     Command Window to get you started issuing MATLAB commands as quickly
                     as possible. At the top of the Command Window, you may see some general
                     information about MATLAB, perhaps some special instructions for getting
                     started or accessing help, but most important of all, a line that contains a
                     prompt. The prompt will likely be a double caret (>> or  ). If the Command
                     Window is “active”, its title bar will be dark, and the prompt will be followed by
                     a cursor (a vertical line or box, usually blinking). That is the place where you
                     will enter your MATLAB commands (see Chapter 2). If the Command Window
                     is not active, just click in it anywhere. Figure 1-1 contains an example of a
                     newly launched MATLAB Desktop.

                   ➱ In older versions of MATLAB, for example 5.3, there is no integrated
                       Desktop. Only the Command Window appears when you launch the
                       application. (On UNIX systems, the terminal window from which
                       you invoke MATLAB becomes the Command Window.) Commands
                       that we instruct you to enter in the Command Window inside the
                       Desktop for version 6 can be entered directly into the Command
                       Window in version 5.3 and older versions.


           Typing in the Command Window



                     Click in the Command Window to make it active. When a window becomes
                     active, its titlebar darkens. It is also likely that your cursor will change from
   17   18   19   20   21   22   23   24   25   26   27