2popular lore has it, and it can often be narrowed or closed with good MATLAB programming (seesection6), but MATLAB is not the best tool for high-performance computing.TheMATLABnicheisnumericalcomputationonworkstationsfornonexpertsincomputation.Thisisahugeniche—onewaytotellistolookatthenumberofMATLAB-relatedbookson
. Even for hard-core supercomputer users, MATLAB can be a valuable environmentin which to explore and ﬁne-tune algorithms before more laborious coding in C.
1.1 The ﬁfty-cent tour
andperhapsafewothernewwindowsas well. The layout and behavior of the desktop and its components are highly customizable.The component that is the heart of MATLAB is called the Command Window. Here you cangive MATLAB commands typed at the prompt,
. Unlike FORTRAN, and other compiled com-puter languages, MATLAB is an
environment—you give a command, and MATLABtries to follow it right away before asking for another.In the default desktop you can also see the Launch Pad. The Launch Pad is a window intothe impressive breadth of MATLAB. Individual
add capability in speciﬁc methods orspecialties. Often these represent a great deal of expert knowledge. Most have friendly demon-strations that hint at their capabilities, and it’s easy to waste a day on these. You may notice thatmany toolboxes are related to electrical engineering, which is a large share of MATLAB’s clientele.Another major item, not exactly a toolbox, is Simulink, which is a control- and system-orientedinterface to MATLAB’s dynamic simulation facilities.Notice at the top of the desktop that MATLAB has a notion of
, just likeUNIX does. In general MATLAB can only “see” ﬁles in the current directory and on its own
.Commands for working with the directory and path include
(in addition to widgets and menu items). We will return to this subject in section3.You can also see a tab for the
next to the Launch Pad. The workspace shows youwhat variables are currently deﬁned and some information about their contents. At startup it is,naturally, empty.In this document I will often give the names of commands that can be used at the prompt. Inmany (maybe most) cases these have equivalents among the menus, buttons, and other graphicalwidgets. Take some time to explore these widgets. This is one way to become familiar with thepossibilities in MATLAB.
MATLABisahugepackage. Youcan’tlearneverythingaboutitatonce, oralwaysrememberhowyou have done things before. It is essential that you learn how to teach yourself more using theonline help.There are two levels of help:
If you need quick help on the syntax of a command, use
. For example,
tells you all the ways in which you can use the
by itself givesyou a list of categories that themselves yield lists of commands.