07-08-2012, 11:51 AM
MATLAB Primer
Introduction
MATLAB®, developed by The MathWorks, Inc.,
integrates computation, visualization, and programming
in a flexible, open environment. It offers engineers,
scientists, and mathematicians an intuitive language for
expressing problems and their solutions mathematically
and graphically. Complex numeric and symbolic
problems can be solved in a fraction of the time required
with a programming language such as C, Fortran, or Java.
How to use this book: The purpose of this Primer is to
help you begin to use MATLAB. It is not intended to be
a substitute for the online help facility or the MATLAB
documentation (such as Getting Started with MATLAB,
available in printed form and online). The Primer can
best be used hands-on. You are encouraged to work at
the computer as you read the Primer and freely
experiment with the examples. This Primer, along with
the online help facility, usually suffices for students in a
class requiring the use of MATLAB.
Start with the examples at the beginning of each chapter.
In this way, you will create all of the matrices and M-files
used in the examples. Some examples depend on code
you write in previous chapters.
How to obtain MATLAB:
Version 7.0 (Release 14) of MATLAB is available for
Microsoft Windows (XP, 2000, and NT 4.0), Unix
(Linux, Solaris 2.8 and 2.9, and HPUX
11 or 11i), and the Macintosh (OS X 10.3.2 Panther).
A Student Version is available for all but Solaris and HPUX;
it includes MATLAB, Simulink, and key functions
of the Symbolic Math Toolbox. Everything discussed in
this book can be done in the Student Version of
MATLAB, with the exception of advanced features of the
Symbolic Math Toolbox discussed in Section 16.13.
Accessing MATLAB
On Unix systems you can enter MATLAB with the
system command matlab and exit MATLAB with the
MATLAB command quit or exit. In Microsoft
Windows and the Macintosh, just double-click on the
MATLAB icon.
The MATLAB Desktop
MATLAB has an extensive graphical user interface.
When MATLAB starts, the MATLAB window will
appear, with several subwindows and menu bars.
All of MATLAB’s windows in the default desktop are
docked, which means that they are tiled on the main
MATLAB window. You can undock a window by
selecting the menu item Desktop ► Undock or by
clicking its undock button
Help window
This window is the most useful window for beginning
MATLAB users, and MATLAB experts continue to use it
heavily. Select Help ► MATLAB Help or type doc. The
Help window has most of the features you would see in
any web browser (clickable links, a back button, and a
search engine, for example). The Help Navigator on the
left shows where you are in the MATLAB online
documentation. Online Help sections are referred to as
Help: MATLAB: Getting Started: Introduction, for
example. Click on the beside MATLAB in the Help
Navigator, and you will see the MATLAB Roadmap (or
Help: MATLAB for short). Printable versions of the
documentation are available under this category (see
Help: MATLAB: Printable Documentation (PDF)).