MATLAB TUTORIAL - PowerPoint PPT Presentation

About This Presentation
Title:

MATLAB TUTORIAL

Description:

MATLAB TUTORIAL Matlab Basics Purpose of this Section To illustrate simple uses of the MATLAB Technical language To help you understand under what circumstances is ... – PowerPoint PPT presentation

Number of Views:228
Avg rating:3.0/5.0
Slides: 30
Provided by: imr25
Category:

less

Transcript and Presenter's Notes

Title: MATLAB TUTORIAL


1
MATLAB TUTORIAL
  • Matlab Basics

2
Purpose of this Section
  • To illustrate simple uses of the MATLAB Technical
    language
  • To help you understand under what circumstances
    is MATLAB a better choice than spreadsheets and
    high-level languages

3
What is MATLAB?
  • A high-performance language for technical
    computing (Mathworks, 1998)
  • Typical uses of MATLAB
  • Mathematical computations
  • Algorithmic development
  • Model prototyping (prior to complex model
    development)
  • Data analysis and exploration of data
    (visualization)
  • Scientific and engineering graphics for
    presentation

4
Why Matlab?
  • Because it simplifies the analysis of
    mathematical models
  • It frees you from coding in high-level languages
    (saves a lot of time - with some computational
    speed penalties)
  • Provides an extensible programming/visualization
    environment
  • Provides professional looking graphs

5
Foundation of Matlab
  • The name is derived from MATrix LABoratory
  • MATLAB is a case sensitive language (a variable
    named c is different than another one called
    C)
  • MATLAB works with matrices everything MATLAB
    understands is a matrix (from text to large cell
    arrays and structure arrays)
  • Various data types exist within MATLAB
  • - single precision
  • - double precision
  • - integer (8 bit)

6
The Matlab Environment
7
  • MATLAB has the following basic window components
  • Work-space
  • Displays all the defined variables.
  • Command Window
  • To execute commands in the MATLAB
    environment
  • Command History
  • Displays record of the commands used

8
Command Window
9
Command Window (Contd..)
  • The command window allows you to interact with
  • MATLAB just as if you type things in a
    calculator
  • Cut and paste operations ease the repetition of
    tasks
  • Use up-arrow key to repeat commands (command
  • history)

10
Launch Pad
11
Launch Pad (Contd)
  • The launch window allows you to quickly select
    among various MATLAB components and toolboxes

12
Matlab Workspace
13
Workspace(Contd)
  • Workspace of Matlab shows all the defined
    variables along with their order, memory space
    they occupy and the class to which they belong
  • Above are shown a few such variables

14
Current Directory
15
Current Directory (Contd)
  • Provides quick access to all files available in
    your Path
  • Provides a brief description (when files are
    commented out) of each M-file

16
Different Views
17
Different Views (Contd)
  • The Matlab environment could be viewed in various
    ways.
  • This could be accomplished by the VIEW pull-down
    menu as shown in the previous slide.

18
Matlab Help
19
Matlab Help (Contd..)
  • Matlab Help is an extremely powerful assistance
    to learn Matlab.
  • The Help not only contains the theoretical
    background but also shows the demos for
    implementation
  • The Matlab Help could be opened by using the HELP
    pull-down menu

20
Matlab Help (Contd..)
21
Matlab Help (Contd..)
  • Any command description can be found by typing
    the command in the search field.
  • As shown above the command to take square root
    (sqrt) is searched
  • We can also utilize the Matlab help from the
    command window as shown in the next slide.

22
Matlab Help (Contd..)
23
To begin a new M-file
24
How the source-code looks like
25
The Whos Command
26
Scalar Calculation
27
Vector Calculation
28
Matrix Calculation
29
Thank You
Write a Comment
User Comments (0)
About PowerShow.com