




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Matlab is a high-level technical computing system with a development environment for managing code, files, and data. It offers interactive tools for exploratory data analysis, design, and problem-solving, as well as mathematical functions for linear algebra, statistics, fourier analysis, filtering, optimization, and numerical integration. The system also includes 2-d and 3-d graphics functions for visualizing data and tools for building custom graphical user interfaces.
Typology: Study notes
1 / 280
This page cannot be seen from the preview
Don't miss anything!





























































































How to Contact 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.
MATLAB ®^ Getting Started Guide
© COPYRIGHT 1984–2010 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 and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information.
Contents
Getting Started
Introduction
Matrices and Arrays
Programming
Desktop Tools and Development Environment
External Interfaces
Call MATLAB Software from C/C++ and Fortran
Call C/C++ and Fortran Programs from MATLAB Command
Call Sun Java Commands from MATLAB Command
Index
_
Getting Started
The MATLAB ®^ high-performance language for technical computing integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. You can watch the Getting Started with MATLAB video demo for an overview of the major functionality. If you have an active Internet connection, you can also watch the Working in the Development Environment video demo, and the Writing a MATLAB Program video demo. This collection includes the following topics:
Chapter 1, Introduction (p. 1-1) Describes the components of the MATLAB system Chapter 2, Matrices and Arrays (p. 2-1)
How to use MATLAB to generate matrices and perform mathematical operations on matrices Chapter 3, Graphics (p. 3-1) How to plot data, annotate graphs, and work with images Chapter 4, Programming (p. 4-1) How to use MATLAB to create scripts and functions, how to construct and manipulate data structures Chapter 5, Data Analysis (p. 5-1) How to set up a basic data analysis Chapter 6, Creating Graphical User Interfaces (p. 6-1)
Introduces GUIDE, the MATLAB graphical user interface development environment. Chapter 7, Desktop Tools and Development Environment (p. 7-1)
Information about tools and the MATLAB desktop Chapter 8, External Interfaces (p. 8-1)
Introduces external interfaces available in MATLAB software.
Getting Started
A printable version (PDF) of this documentation is available on the Web—MATLAB Getting Started Guide. For tutorial information about any of the topics covered in this collection, see the corresponding sections in the MATLAB documentation. For reference information about MATLAB functions, see the MATLAB Function Reference.
1 Introduction
Product Overview
In this section... “Overview of the MATLAB Environment” on page 1- “The MATLAB System” on page 1-
Overview of the MATLAB Environment MATLAB is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. Using the MATLAB product, you can solve technical computing problems faster than with traditional programming languages, such as C, C++, and Fortran.
You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Add-on toolboxes (collections of special-purpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas.
MATLAB provides a number of features for documenting and sharing your work. You can integrate your MATLAB code with other languages and applications, and distribute your MATLAB algorithms and applications. Features include:
- High-level language for technical computing - Development environment for managing code, files, and data - Interactive tools for iterative exploration, design, and problem solving - Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, and numerical integration - 2-D and 3-D graphics functions for visualizing data - Tools for building custom graphical user interfaces
Product Overview
- Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, Fortran, Java™, COM, and Microsoft®^ Excel ®
The MATLAB System
The MATLAB system consists of these main parts:
This part of MATLAB is the set of tools and facilities that help you use and become more productive with MATLAB functions and files. Many of these tools are graphical user interfaces. It includes: the MATLAB desktop and Command Window, an editor and debugger, a code analyzer, and browsers for viewing help, the workspace, and folders.
This library is a vast collection of computational algorithms ranging from elementary functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix eigenvalues, Bessel functions, and fast Fourier transforms.
The MATLAB language is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. It allows both “programming in the small” to rapidly create quick programs you do not intend to reuse. You can also do “programming in the large” to create complex application programs intended for reuse.
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.
Documentation
Documentation
The MATLAB program 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, begin with this Getting Started guide. It covers all the primary MATLAB features at a high level, including many examples.
To view the online documentation, select Help > Product Help 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, see “Getting Help” on page 7-7.
The MATLAB documentation is organized into these main topics:
- Desktop Tools and Development Environment — Startup and shutdown, arranging the desktop, and using tools to become more productive with MATLAB - Data Import and Export — Retrieving and storing data, memory-mapping, and accessing Internet files - Mathematics — Mathematical operations - Data Analysis — Data analysis, including data fitting, Fourier analysis, and time-series tools - Programming Fundamentals — The MATLAB language and how to develop MATLAB applications - Object-Oriented Programming — Designing and implementing MATLAB classes - Graphics — Tools and techniques for plotting, graph annotation, printing, and programming with Handle Graphics ®^ objects - 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 Sun Microsystems™ Java software, Microsoft ®^ .NET Framework, COM, Web services, and the serial port
1 Introduction
There is reference documentation for all MATLAB functions:
- Function Reference — Lists all MATLAB functions, listed in categories or alphabetically - Handle Graphics Property Browser — Provides easy access to descriptions of graphics object properties - C/C++ and Fortran API Reference — Covers functions used by the MATLAB external interfaces, providing information on syntax in the calling language, description, arguments, return values, and examples
The MATLAB online documentation also includes:
- Examples — An index of examples included in the documentation - Release Notes — New features, compatibility considerations, and bug reports for current and recent previous releases - Printable Documentation — PDF versions of the documentation, suitable for printing
In addition to the documentation, you can access demos for each product from the Help browser. Run demos to learn about key functionality of MathWorks ® products and tools.