A Brief Introduction to MATLAB - PowerPoint PPT Presentation

About This Presentation
Title:

A Brief Introduction to MATLAB

Description:

A Brief Introduction to MATLAB Shibaji Shome and Rob MacLeod CVRTI University of Utah What is MATLAB? MATrix LABoratory (The MathWorks,Inc) Easy access to matrix ... – PowerPoint PPT presentation

Number of Views:363
Avg rating:3.0/5.0
Slides: 12
Provided by: pri5190
Learn more at: https://www.sci.utah.edu
Category:

less

Transcript and Presenter's Notes

Title: A Brief Introduction to MATLAB


1
  • A Brief Introduction to MATLAB
  • Shibaji Shome and Rob MacLeod
  • CVRTI
  • University of Utah

2
What is MATLAB?
  • MATrix LABoratory (The MathWorks,Inc)
  • Easy access to matrix computation software
  • Scientific computing and Visualization package
  • Arrays/matrices are at the heart of MATLAB
  • All data are stored as arrays

3
Ok, but what is MATLAB?
  • 1) Concept of Workspace
  • 2) In-Built functions - commands
  • 3) M-scripts
  • 4) User-defined functions

4
Workspace
  • Workspace initializes on launch
  • Front end to MATLAB
  • Access MATLAB functions
  • Manage variables

5
Workspace
  • Start MATLAB Type matlab at system prompt /
    click application icon
  • On starting MATLAB
  • Matlab command window - your workspace
  • Matlab command prompt - interact

6
Commands
  • In built functions
  • Manage environment, variables, commands,
    functions
  • Manage files, interact with the OS
  • Perform computations, etc

7
(No Transcript)
8
M-Files or scripts
  • Execute a batch of commands in a sequential
    manner.
  • Compartmentalize your commands, organize them
    into a M-file.
  • All variables and results are global ie can be
    accessed from the workspace.
  • Name your m-file (with a .m extension), execute
    at command prompt by just typing the filename.

9
(No Transcript)
10
Functions
  • Essentially user defined commands.
  • Accept inputs from the workspace or another
    function/command.
  • Output to workspace or output becomes input to
    another command/function.
  • Encapsulation of variables.
  • Only the outputs of a function are global.
  • A function can call other functions within it,
    make calls to itself recursively.
  • Structures your program, makes it more flexible,
    manageable and easy to debug.

11
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com