




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































How to Contact The MathWorks
www.mathworks.com Web comp.soft-sys.matlab Newsgroup www.mathworks.com/contact_TS.html Technical Support
[email protected] Product enhancement suggestions [email protected] Bug reports [email protected] Documentation error reports [email protected] Order status, license renewals, passcodes [email protected] Sales, pricing, and general information
For contact information about worldwide offices, see the MathWorks Web site.
Getting Started with MATLAB
© COPYRIGHT 1984–2007 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the government’s needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, Embedded MATLAB, and PolySpace are trademarks of The MathWorks, Inc.
Other product or brand names are trademarks or registered trademarks of their respective holders.
Patents
The MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information.
Introduction
Matrices and Arrays
Programming
Data Analysis
External Interfaces
Index
What Is MATLAB? (p. 1-2) See how MATLAB ®^ can provide solutions for you in technical computing, what are some of the common applications of MATLAB, and what types of add-on application-specific solutions are available in MATLAB toolboxes. MATLAB Documentation (p. 1-5) Find out where to look for instruction on how to use each component of MATLAB, and where to find help when you need it. Starting and Quitting MATLAB (p. 1-7)
Start a new MATLAB session, use the desktop environment, and terminate the session.
1 Introduction
What Is MATLAB?
In this section... “Overview of MATLAB” on page 1- “The MATLAB System” on page 1-
Overview of MATLAB MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include
- Math and computation - Algorithm development - Data acquisition - Modeling, simulation, and prototyping - Data analysis, exploration, and visualization - Scientific and engineering graphics - Application development, including graphical user interface building
MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar noninteractive language such as C or Fortran.
The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects. Today, MATLAB engines incorporate the LAPACK and BLAS libraries, embedding the state of the art in software for matrix computation.
MATLAB has evolved over a period of years with input from many users. In university environments, it is the standard instructional tool for introductory
1 Introduction
MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes high-level functions for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications.
This is a library that allows you to write C and Fortran programs that interact with MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT-files.
MATLAB Documentation
MATLAB Documentation
MATLAB provides extensive documentation, in both printable and HTML format, to help you learn about and use all of its features. If you are a new user, start with this Getting Started book. It covers all the primary MATLAB features at a high level, including many examples.
To view the online documentation, select MATLAB Help from the Help menu in MATLAB. Online help appears in the Help browser, providing task-oriented and reference information about MATLAB features. For more information about using the Help browser, including typographical conventions used in the documentation, see “Help” on page 7-8.
The MATLAB documentation is organized into these main topics:
- Desktop Tools and Development Environment — Startup and shutdown, the desktop, and other tools that help you use MATLAB - Mathematics — Mathematical operations - Data Analysis — Data analysis, including data fitting, Fourier analysis, and time-series tools - Programming — The MATLAB language and how to develop MATLAB applications - Graphics — Tools and techniques for plotting, graph annotation, printing, and programming with Handle Graphics ® - 3-D Visualization — Visualizing surface and volume data, transparency, and viewing and lighting techniques - Creating Graphical User Interfaces — GUI-building tools and how to write callback functions - External Interfaces — MEX-files, the MATLAB engine, and interfacing to Java, COM, and the serial port
Starting and Quitting MATLAB
Starting and Quitting MATLAB
In this section... “Starting MATLAB” on page 1- “Quitting MATLAB” on page 1-
Starting MATLAB On Windows platforms, start MATLAB by double-clicking the MATLAB shortcut icon on your Windows desktop.
On UNIX platforms, start MATLAB by typing matlab at the operating system prompt.
You can customize MATLAB startup. For example, you can change the directory in which MATLAB starts or automatically execute MATLAB statements in a script file named startup.m.
For More Information See “Starting MATLAB on Windows Platforms” and “Starting MATLAB on UNIX Platforms” in the Desktop Tools and Development Environment documentation.
When you start MATLAB, the MATLAB desktop appears, containing tools (graphical user interfaces) for managing files, variables, and applications associated with MATLAB.
The following illustration shows the default desktop. You can customize the arrangement of tools and documents to suit your needs. For more information about the desktop tools, see Chapter 7, “Desktop Tools and Development Environment”.
1 Introduction
Quitting MATLAB To end your MATLAB session, select File > Exit MATLAB in the desktop, or type quit in the Command Window. You can run a script file named