11.07.2015 Views

MatlabNotes

MatlabNotes

MatlabNotes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1 MATLAB• Matlab is an interactive system for doingnumerical computations.• A numerical analyst called Cleve Molerwrote the first version of Matlab in the1970s. It has since evolved into a successfulcommercial software package.• Matlab relieves you of a lot of the mundanetasks associated with solving problemsnumerically. This allows you to spendmore time thinking, and encourages youto experiment.• Matlab makes use of highly respected algorithmsand hence you can be confidentabout your results.• Powerful operations can be performed usingjust one or two commands.• You can build up your own set of functionsfor a particular application.• Excellent graphics facilities are available,and the pictures can be inserted into L A TEXand Word documents.These notes provide only a brief glimpse of thepower and flexibility of the Matlab system. Fora more comprehensive view we recommend thebookMatlab Guide 2nd ed.D.J. Higham & N.J. HighamSIAM Philadelphia, 2005, ISBN:0-89871-578-4.2 Starting UpMatlab can be used in a number of di↵erentways or modes; as an advanced calculator in thecalculator mode, in a high level programminglanguage mode and as a subroutine called froma C-program. More information on the first twoof these modes is provided by these notes.When used in calculator mode all Matlab commandsare entered to the command line fromthe keyboard at the “command line prompt”indicated with ’>>’.Type quit at any time to exit from Matlab.Extensive documentation is available, either viathe command line by using the ’help topic’command (see below) or via the internet. Werecommend starting with the commanddemo(a link may also be provided on the top lineof the command window). This brings up aseparate window which gives access to a shortvideo entitled “Getting Started” that describesthe purpose of the various panes in the mainMatlab window.Help is available from the command line prompt.Type help help for “help” (which gives a briefsynopsis of the help system), help for a list oftopics. The first few lines of this readHELP topics: --MatlabCode/matlab - (No table of contents file)matlab/general - General purpose commands.matlab/ops - Operators and special ...matlab/lang - Programming language ...matlab/elmat - Elementary matrices and ...matlab/randfun - Random matrices and ...matlab/elfun - Elementary math functions.matlab/specfun - Specialized math functions.(truncated lines are shown with . . . ). Then toobtain help on “Elementary math functions”,for instance, type>> help elfunClicking on a key word, for example sin willprovide further information together with a linkto doc sin which provides the most extensivedocumentation on a keyword along with examplesof its use.Another useful facility is to use thelookfor keywordcommand, which searches the help files for thekeyword. See Exercise 15.1 (page 22) for anexample of its use.2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!