Page 15 -
P. 15

1




                             Introduction to MATLAB  and
                                                                  ®
                             Its Graphics Capabilities










                             1.1  Getting Started

                             MATLAB can be thought of as a library of programs that will prove very use-
                             ful in solving many electrical engineering computational problems. MAT-
                             LAB is an ideal tool for numerically assisting you in obtaining answers,
                             which is a major goal of engineering analysis and design. This program is
                             very useful in circuit analysis, device design, signal processing, filter design,
                             control system analysis, antenna design, microwave engineering, photonics
                             engineering, computer engineering, and all other sub-fields of electrical engi-
                             neering. It is also a powerful graphic and visualization tool.
                              The first step in using MATLAB is to know how to call it. It is important to
                             remember that although the front-end and the interfacing for machines with
                             different operating systems are sometimes different, once you are inside MAT-
                             LAB, all programs and routines are written in the same manner. Only those
                             few commands that are for file management and for interfacing with external
                             devices such as printers may be different for different operating systems.
                              After entering MATLAB, you should see the prompt >>, which means the
                             program interpreter is waiting for you to enter instructions. (Remember to
                             press the Return key at the end of each line that you enter.)
                              Now type clf. This command creates a graph window (if one does not
                             already exist) or clears an existing graph window.
                              Because it is impossible to explain the function of every MATLAB com-
                             mand within this text, how would you get information on a certain command
                             syntax? The MATLAB program has extensive help documentation available
                             with simple commands. For example, if you wanted help on a function called
                             roots (we will use this function often), you would type help roots.
                              Note that the help facility cross-references other functions that may have
                             related uses. This requires that you know the function name. If you want an
                             idea of the available help files in MATLAB, type help. This gives you a list
                             of topics included in MATLAB. To get help on a particular topic such as the
                             Optimization Toolbox, type help toolbox/optim. This gives you a list of
                             0-8493-????-?/00/$0.00+$.50
                             © 2000 by CRC Press LLC
                            © 2001 by CRC Press LLC
   10   11   12   13   14   15   16   17   18   19   20