You are on page 1of 43

MATLAB

MATLAB WORKSHOP
WORKSHOP

ABOUT
ABOUT WORKSHOP
WORKSHOP
In
In this
this workshop
workshop you
you will
will learn
learn aa few
few of
of
the
the basic
basic functions
functions of
of MATLAB.
MATLAB.
First
First we
we will
will start
start working
working with
with basic
basic
numbers,
numbers, formats,
formats, demos,
demos,
mathematical
mathematical functions,
functions, setting
setting
variables,
variables, matrices
matrices and
and generating
generating
plots
plots by
by using
using the
the plot
plot functions.
functions.
Brief
Brief overview
overview of
of how
how to
to generate
generate
scripts
scripts in
in MATLAB
MATLAB called
called M-files.
M-files.

ABOUT
ABOUT WORKSHOP
WORKSHOP
The
The workshop
workshop is
is designed
designed for
for students
students
using
using either
either the
the professional
professional version
version of
of
MATLAB
MATLAB with
with the
the Control
Control Systems
Systems Toolbox
Toolbox
and
and the
the Signal
Signal Processing
Processing Toolbox,
Toolbox, or
or using
using
the
the Student
Student Edition
Edition of
of MATLAB.
MATLAB.
For
For latest
latest version
version of
of MATLAB
MATLAB at
at the
the time
time and
and
more
more information
information on
on MATLAB,
MATLAB, contact
contact

The
The Mathworks,
Mathworks, Inc
Inc..
www.mathworks.com
www.mathworks.com

MATLAB
MATLAB WORKSHOP
WORKSHOP
Lecture # 1

Wednesdayday January 13
Introduction
MATLAB Demos

MATLAB Basics

Lecture # 2
Wednesday January 20

MATLAB Basics

MATLAB Plots

MATLAB Examples

Lecture # 3
Wednesday January 7

MATLAB Fundation

Textbook Examples

Short Quiz

MATLAB
MATLAB WORKSHOP
WORKSHOP
Lecture # 1

Wednesday Jan 13
Introduction
MATLAB Demos
MATLAB Basics

MATLAB
MATLAB Introduction
Introduction
MATLAB
MATLAB is
is both
both computer
computer
programming
programming language
language and
and software
software
environment
environment for
for using
using that
that language
language
effectively.
effectively.
MATLAB
MATLAB is
is matrix-oriented,
matrix-oriented, so
so what
what
would
would take
take several
several statements
statements in
in C
C or
or
Fortran
Fortran can
can usually
usually be
be accomplished
accomplished
in
in just
just aa few
few lines
lines using
using MATLAB's
MATLAB's
built-in
built-in matrix
matrix and
and vector
vector operations
operations

MATLAB
MATLAB Introduction
Introduction
FORTRAN:
FORTRAN:

real*8
real*8 A(10,10),
A(10,10), B(10,10),
B(10,10), C(10,10)
C(10,10)
do
do i=1,10
i=1,10
do
do j=1,10
j=1,10
C(i,j)
C(i,j) == A(i,j)
A(i,j) ++ B(i,j)
B(i,j)
10
10 continue
continue
20
20 continue
continue

MATLAB:
MATLAB:
C
C == A
A ++ B
B

MATLAB
MATLAB Introduction
Introduction

MATLAB
MATLAB is
is available
available
for
for MS
MS Windows,
Windows,
Macintosh
Macintosh personal
personal
computer,
computer, Unix
Unix and
and
other
other operating
operating
systems.
systems.

MATLAB
MATLAB Introduction
Introduction

MATLAB,
MATLAB, which
which stands
stands for
for
MATrix
MATrix LABoratory,
LABoratory, is
is aa
powerful,
powerful, general-purpose
general-purpose
system
system or
or environment
environment for
for
doing
doing mathematics,
mathematics,
scientific
scientific and
and engireeng
engireeng
calculations.
calculations.

MATLAB
MATLAB Introduction
Introduction

MATLAB
MATLAB is
is aa "High"HighPerformance
Performance Numeric
Numeric
Computation
Computation and
and
Visualization
Visualization Software"
Software"
package.
package.

MATLAB
MATLAB Introduction
Introduction

MATLAB
MATLAB is
is an
an
interactive
interactive system
system
whose
whose basic
basic data
data is
is aa
matrix
matrix that
that does
does not
not
require
require dimensioning.
dimensioning.

MATLAB
MATLAB Introduction
Introduction

MATLAB
MATLABsupports
supports many
manytypes
typesof
of graph
graphand
andsurface
surface
plots:
plots:
line
lineplots
plots(x
(x vs.
vs.y),
y),
filled
filledplots,
plots,
bar
barcharts,
charts,
pie
piecharts,
charts,
parametric
parametricplots,
plots,
polar
polarplots,
plots,
contour
contourplots,
plots,
density
densityplots,
plots,
log
logaxis
axisplots,
plots,
surface
surfaceplots,
plots,
parametric
parametricplots
plotsin
in 33dimensions
dimensionsand
andspherical
spherical
plots.
plots.

MATLAB
MATLAB Introduction
Introduction
MATLAB
MATLABhas
has aanumber
number of
of add-on
add-onsoftware
softwaremodules,
modules,
called
called toolbox
toolbox ,,that
that perform
perform more
morespecialized
specialized
computations.
computations.
Signal
Signal&&Image
ImageProcessing
Processing
Signal
Signal ProcessingProcessing- Image
ImageProcessing
Processing
Communications
Communications-- System
System Identification
Identification-- Wavelet
Wavelet
Filter
FilterDesign
Design
Control
ControlDesign
Design
Control
ControlSystem
System --Fuzzy
FuzzyLogic
Logic-- Robust
Robust Control
Control-- Analysis
Analysisand
andSynthesis
Synthesis--LMI
LMI Control
Control -- Model
Model
Predictive
PredictiveControl
ControlModel-Based
Model-BasedCalibration
Calibration

More
More than
than 60
60 toolboxes!
toolboxes!

MATLAB
MATLAB Introduction
Introduction
In
In Windows
Windows
systems
systems
MATLAB
MATLAB is
is
started
started by
by
double-clicking
double-clicking
the
the mouse
mouse on
on
the
the appropriate
appropriate
icon.
icon.

MATLAB
Command
Window

File

Edit

View

View

View

Web

Help

MATLAB
MATLAB Introduction
Introduction

MATLAB
MATLAB includes
includes hundreds
hundreds
of
of functions
functions for:
for:

Data
Data analysis
analysis and
and visualization,
visualization,
Numeric
Numeric and
and symbolic
symbolic computation,
computation,
Engineering
Engineering and
and Scientific
Scientific graphics,
graphics,
Modeling,
Modeling, simulation,
simulation, and
and prototyping,
prototyping,
Eigenvalue,
Eigenvalue, singular
singular value
value

MATLAB
MATLAB Demos
Demos
Demonstrations
Demonstrations are
are
invaluable
invaluable since
since they
they
give
give an
an indication
indication of
of
the
the MATLAB
MATLAB
capabilities.
capabilities.
A
A comprehensive
comprehensive set
set
are
are available
available by
by
typing
typing the
the command
command
>>demo
>>demo in
in MATLAB
MATLAB
prompt.
prompt.

MATLAB
MATLAB Demos
Demos
MATLAB
MATLAB works
works with
with scalars,
scalars,
vectors
vectors and
and matrices:
matrices:

Basic
Basic matrix
matrix operations,
operations,
Inverses
Inverses of
of matrices,
matrices,
Graphs
Graphs of
of matrices,
matrices,
Matrix
Matrix manipulation,
manipulation,
Programming,
Programming, application
application
development,
development, and
and GUI
GUI design
design

MATLAB
MATLAB Demos
Demos
MATLAB
MATLAB has
has remarkable
remarkable
graphics
graphics capacities:
capacities:

2-D
2-D and
and 3-D
3-D plots,
plots,
Line
Line plotting,
plotting,
3-D
3-D surface
surface plot,
plot,
Splash
Splash screen
screen plot,
plot,
Plot
Plot of
of complex
complex functions
functions and
and ...
...

MATLAB
MATLAB Demos
Demos
MATLAB
MATLAB has
has remarkable
remarkable graphics
graphics
capacities,
capacities, 3_D
3_D plots
plots are
are some
some of
of
them:
them:

3-D
3-D plots
plots in
in Handel
Handel Graphics
Graphics
Plot
Plot Type,
Type,
Shading,
Shading,
Colomap,
Colomap,
Axis
Axis and
and ...
...

MATLAB
MATLAB Demos
Demos
MATLAB
MATLAB has
has remarkable
remarkable graphics
graphics
capacities,
capacities, gallery
gallery is
is one
one of
of them:
them:
The
The Gallery
Gallery is
is aa place
place to
to hang
hang particularly
particularly
elegant
elegant examples
examples of
of graphics
graphics visualization
visualization
in
in MATLAB.
MATLAB.
Knot,
Knot,
Quiver,
Quiver,
Klein
Klein II,
II,
Cruller
Cruller and
and ...
...

MATLAB
MATLAB Demos
Demos
MATLAB
MATLAB has
has many
many
toolboxes:
toolboxes:
Control
Control toolbox
toolbox is
is one
one of
of the
the
important
important toolbox
toolbox in
in MATLAB.
MATLAB.
RLC
RLC Circuit
Circuit Response,
Response,
Gain
Gain and
and Phase
Phase Margins,
Margins,
Notch
Notch Filter
Filter Discrete,
Discrete,
PID
PID and
and ...
...

MATLAB
MATLAB Demos
Demos
MATLAB
MATLAB has
has many
many toolboxes:
toolboxes:

Signal
Signal Processing
Processing toolbox
toolbox is
is one
one of
of
the
the important
important toolobx
toolobx in
in MATLAB.
MATLAB.
Designing
Designing Filter,
Filter,
Filtering
Filtering aa Signal,
Signal,
Discrete
Discrete and
and Continuous
Continuous Fourier
Fourier
Transform,
Transform,
Spectral
Spectral Analysis
Analysis and
and ...
...

MATLAB
MATLAB Demos
Demos
Simulink
Simulink has
has the
the ability
ability to
to
simulate
simulate aa large
large range
range of
of
systems,
systems, from
from very
very simple
simple to
to
extraordinarily
extraordinarily complex.
complex. The
The
Model
Model and
and demonstrations
demonstrations that
that
you
you will
will see
see in
in this
this section
section
include
include both
both simple
simple and
and
complex
complex systems.
systems.

MATLAB
MATLAB Demos
Demos
Simulink
Simulink has
has the
the ability
ability to
to
simulate
simulate aa large
large range
range of
of systems,
systems,
in
in the
the menu
menu of
of Simulation
Simulation we
we
have:
have:
Pause.
Pause.
Stop,
Stop,
Simulation
Simulation Parameters,
Parameters,
Start,
Start,

MATLAB
MATLAB WORKSHOP
WORKSHOP
End of Lecture # 1

MATLAB Basics
Next

time

You might also like