Sie sind auf Seite 1von 10

Introduction to MATLAB

Lecture 1
Eng. Mohamed Awni
Electrical & Computer Engineering
Dept.

Agenda
What is Matlab & history?
why use Matlab?
Matlab Structure.
Main Matlab Window.
Matlab as calculator.

What is Matlab & its history


Stands for MATrix LABoratory.
MATLAB is a numerical computing environment
and programming language.
High level language for technical computing
Created by The MathWorks 1984
American mathematician and computer
programmer specializing in numerical analysis
Origins of MATLAB
http://www.mathworks.com/videos/origins-of-matlab-70332.html

Cleve Moler

Why use Matlab?


MATLAB allows easy in: Matrix manipulation.
Plotting of functions and data.
Implementation of algorithms.

Creation of user interfaces (GUI).


Interfacing with programs in other languages.

Matlab Structure
Matlab
Series of Matlab
commands

m-files
(Batch Mode

Command Line
(Interactive Mode)

mat-files

functions

Command execution
like DOS command
window

Data
storage/
loading

Main Matlab Window

Command
Window
Current Directory
Command
History
Workspace
Editor Window

Thecommands
main
window
characterized
by
theyou
MATLAB
command
prompt
(>>)recorded,
This
This
sub
is where
window
alltyped
lists
your
all
files
variables
from the
that
current
have
directory
generated
are listed.
so
far along
with there type
All
on
MATLAB
prompt
in
the
command
window
get
This is where you write, edit, create, and save your own script or programs in fileseven
called
and
size.
across
m-files.multiple session in this window.
6

Main Matlab Window

Matlab as calculator
As an example of a simple interactive calculation, just
type the following expression 1 + 2 3 at the prompt
command >>

Press Enter.

The last calculation overwrites the previous calculation in


8
ans.

Matlab as calculator
Assigning the result of computation to the variable x

Assigning results of computation to the variable z

Exercises

10

Das könnte Ihnen auch gefallen