Page 6 - Basics of MATLAB and Beyond
P. 6

typing pwd (print working directory) in the command window.) On a
                               PC or Macintosh, you can add directories to matlab’s path by clicking
                               on the path browser button at the top of the matlab command window
                               (it is the button with two folders on it to the left of the question mark
                               button). In the path browser, select the menu “Path→Add to path”,
                               then select the directory containing the extracted files using the browse
                               button (on PCs it is the one with three dots on it), then check the “add
                               to back” option before pressing “OK”. Then click “File→Save Path”
                               before you exit the path browser. If you are using another platform you
                               can use the path command from within matlab (type help path for
                               instructions). You can install this path each time you start matlab
                               by putting an appropriate path command in a file called startup.m in a
                               directory called matlab situated immediately below your home directory.
                                  Many of the graphical examples in this book assume that the figure
                               window is empty. To ensure an empty figure window issue the command:

                               clf

                               which stands for “clear figure”. If you find that the figure window is
                               obscured by your command window, try shrinking both windows. Or
                               you can type:

                               shg

                               (show graphic) to bring the graphics window to the front. The compan-
                               ion software implements an even shorter abbreviation; type

                               s
                               to bring the graphics window to the front
                                  If, on a PC or Macintosh, the figure window is at the front of the
                               screen, or if it has the current focus, just start typing and matlab will
                               switch to the command window and accept your typing.
                                  Words appearing in this book in typewriter font, for example, type,
                               represent matlab commands that you can type in, or output produced
                               by matlab.

                               Andrew Knight

















                               c   2000 by CRC Press LLC
   1   2   3   4   5   6   7   8   9   10   11