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

14        Chapter 2: MATLAB Basics






























                                Figure 2-2: Desktop with the Workspace Browser.
                     calculation by accident. Finally, we observe that the Workspace browser pre-
                     sents a graphical alternative to whos. You can activate it by clicking on the
                     Workspace tab, by typing workspace at the command prompt, or through
                     the View item on the menu bar. Figure 2-2 depicts a Desktop in which the
                     Command Window and the Workspace browser contain the same information
                     as displayed above.


           Errors in Input


                     If you make an error in an input line, MATLAB will beep and print an error
                     message. For example, here’s what happens when you try to evaluate 3uˆ2:

                       >> 3uˆ2
                       ??? 3u^2
                             |
                       Error: Missing operator, comma, or semicolon.
                       The error is a missing multiplication operator *. The correct input would be
                     3*uˆ2. Note that MATLAB places a marker (a vertical line segment) at the
                     place where it thinks the error might be; however, the actual error may have
                     occurred earlier or later in the expression.
   28   29   30   31   32   33   34   35   36   37   38