002 MATLAB Introduction DAY 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

What Is 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 of MATLAB:

• 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 has evolved over a period of
years with input from many users. In
university environments, it is the standard
instructional tool for introductory and
advanced courses in mathematics,
engineering, and science.
In industry, MATLAB is the tool of choice
for high-productivity research, development,
and analysis.
MATLAB features a family of add-on
application-specific solutions called
toolboxes. Very important to most users of
MATLAB, toolboxes allow you to learn and
apply specialized technology.
Toolboxes are comprehensive collections
of MATLAB functions (M-files) that extend the
MATLAB environment to solve particular
classes of problems.
Areas in which toolboxes are available
include signal processing, control systems,
neural networks, fuzzy logic, wavelets,
simulation, and many others.
The MATLAB System
• Development Environment
• The MATLAB Mathematical Function Library
• The MATLAB Language
• Graphics
• The MATLAB Application Program Interface (
API)
Development Environment

This is the set of tools and facilities that


help you use MATLAB functions and files.
Many of these tools are graphical user
interfaces.
It includes the MATLAB desktop and
Command Window, a command history, an
editor and debugger, and browsers for
viewing help, the workspace, files, and the
search path.
The MATLAB Mathematical Function
Library
This 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
This 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 and dirty throw-away
programs, and "programming in the large" to
create complete large and complex
application programs.
Graphics
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.
The MATLAB Application Program
Interface (API)
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.
Development
Environment
Starting and Quitting MATLAB
Starting MATLAB
On Windows platforms, to start MATLAB,
double-click the MATLAB shortcut icon on
your Windows desktop.

Quitting MATLAB
To end your MATLAB session, select Exit
MATLAB from the File menu in the desktop,
or type quit in the Command Window.
MATLAB Desktop
Desktop Tools
• Command Window
• Command History
• Start Button and Launch Pad
• Help Browser
• Current Directory Browser
• Workspace Browser
• Array Editor
• Editor/Debugger
• Profiler
Command Window
Use the Command Window to enter
variables and run functions from M-files.
Command History
Statements you enter in the Command
Window are logged in the Command History.
In the Command History, you can view
previously run statements, and copy and
execute selected statements.
Start Button and Launch Pad
The MATLAB Start button provides easy
access to tools, demos, and documentation.
The Launch Pad provides similar access
in a tree view.
Help Browser
Use the Help browser to search and view
documentation and demos for all your Math
Works products. The Help browser is a Web
browser integrated into the MATLAB desktop
that displays HTML documents.
To open the Help browser, click the help
button in the toolbar, or type helpbrowser
in the Command Window.
Current Directory Browser
MATLAB file operations use the current
directory and the search path as reference
points. Any file you want to run must either be
in the current directory or on the search path.
A quick way to view or change the current
directory is by using the Current Directory
field in the desktop toolbar as shown below.
Workspace Browser
The MATLAB workspace consists of the
set of variables (named arrays) built up
during a MATLAB session and stored in
memory.
You add variables to the workspace by
using functions, running M-files, and loading
saved workspaces.
Array Editor
Double-click a variable in the Workspace
browser to see it in the Array Editor.
Use the Array Editor to view and edit a
visual representation of one- or two-
dimensional numeric arrays, strings, and cell
arrays of strings that are in the workspace.
Editor/Debugger
Use the Editor/Debugger to create and
debug M-files, which are programs you write
to run MATLAB functions.
The Editor/Debugger provides a graphical
user interface for basic text editing, as well as
for M-file debugging.
Profiler
MATLAB includes a graphical user
interface, the Profiler, to help you improve the
performance of your M-files.

You might also like