An Introduction to Matlab Version 2.3
1 MATLAB Matlab is an interactive system for doing numerical computations. A numerical analyst called Cleve Moler wrote the rst version of Matlab in the 1970s. It has since evolved into a successful commercial software package. Matlab relieves you of a lot of the mundane tasks associated with solving problems numerically. This allows you to spend more time thinking, and encourages you to experiment. Matlab makes use of highly respected algorithms and hence you can be condent about your results. Powerful operations can be performed using just one or two commands. You can build up your own set of functions for a particular application. Excellent graphics facilities are available, and the pictures can be inserted into LATEX and Word documents. These notes provide only a brief glimpse of the power and exibility of the Matlab system. For a more comprehensive view we recommend the book Matlab Guide D.J. Higham & N.J. Higham SIAM Philadelphia, 2000, ISBN: 0-89871-469-9. 2 Starting Up 2.1 Windows Systems On Windows systems MATLAB is started by doubleclicking the MATLAB icon on the desktop or by selecting MATLAB from the start menu. The starting procedure takes the user to the Command window where the Command line is indicated with ‘>>’. Used in the calculator mode all Matlab commands are entered to the command line from the keyboard. Matlab can be used in a number of dierent ways or modes; as an advanced calculator in the calculator mode, in a high level programming language mode and as a subroutine called from a C-program. More information on the rst two of these modes is given below. Help and information on Matlab commands can be found in several ways, from the command line by using the ‘help topic’ command (see below), from the separate Help window found under the Help menu or from the Matlab helpdesk stored on disk or on a CD-ROM. Another useful facility is to use the ‘lookfor keyword’ command, which searches the help les for the keyword. See Exercise 16.1 (page 17) for an example of its use. 2.2 Unix Systems You should have a directory reserved for saving les associated with Matlab. Create such a directory (mkdir) if you do not have one. Change into this directory (cd). Start up a new xterm window (do xterm & in the existing xterm window). Launch Matlab in one of the xterm windows with the command matlab After a short pause, the logo will be shown followed by a window containing the Matlab interface. Should you wish to run Matlab in an xterm window, use the command matlab -nojvm and, following dislpay of the logo, the Matlab prompt >> will appear. Type quit at any time to exit from Matlab. 2.3 Command Line Help Help is available from the command line prompt. Type help help for \help” (which gives a brief synopsis of the help system), help for a list of topics. The rst few lines of this read HELP topics: matlab/general – General purpose commands. matlab/ops – Operators and special char… matlab/lang – Programming language const… matlab/elmat – Elementary matrices and ma… matlab/elfun – Elementary math functions. matlab/specfun – Specialized math functions. (truncated lines are shown with . . . ). Then to obtain help on \Elementary math functions”, for instance, type >> help elfun…
Download An Introduction to Matlab Version 2.3.Pdf
August 20, 2009 | Posted by admin
Categories:
Tags: