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

16        Chapter 2: MATLAB Basics


                     arrange your search for documentation in different ways. The first is the Con-
                     tents tab that displays a tree view of all the documentation topics available.
                     The extent of that tree will be determined by how much you (or your system
                     administrator) included in the original MATLAB installation (how many tool-
                     boxes, etc.). The second tab is an Index that displays all the documentation
                     available in index format. It responds to your key entry of likely items you
                     want to investigate in the usual alphabetic reaction mode. The third tab pro-
                     vides the Search mechanism. You type in what you seek, either a function
                     or some other descriptive term, and the search engine locates corresponding
                     documentation that pertains to your entry. Finally, the fourth tab is a roster
                     of your Favorites. Clicking on an item that appears in any of these tabs brings
                     up the corresponding documentation in the display pane.
                       The Help Browser has an excellent tutorial describing its own operation.
                     To view it, open the Browser; if the display pane is not displaying the “Begin
                     Here” page, then click on it in the Contents tab; scroll down to the “Using
                     the Help Browser” link and click on it. The Help Browser is a powerful and
                     easy-to-use aid in finding the information you need on various components of
                     MATLAB. Like any such tool, the more you use it, the more adept you become
                     at its use.
                      If you type helpwin to launch the Help Browser, the display pane will
                       contain the same roster that you see as the result of typing help at the
                       command prompt, but the entries will be links.


           Variables and Assignments


                     In MATLAB, you use the equal sign to assign values to a variable. For instance,

                       >>x=7

                       x=
                             7
                     will give the variable x the value 7 from now on. Henceforth, whenever MAT-
                     LAB sees the letter x, it will substitute the value 7. For example, if y has been
                     defined as a symbolic variable, then

                       >> xˆ2 - 2*x*y + y

                       ans =
                       49-13*y
   30   31   32   33   34   35   36   37   38   39   40