MATLAB stands for MATrix LABoratory. - PowerPoint PPT Presentation

About This Presentation
Title:

MATLAB stands for MATrix LABoratory.

Description:

This presentation contains introduction to MATLAB development environment and its Image processing capabilities. – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 12
Provided by: Nile51
Learn more at: https://cis.temple.edu
Category:

less

Transcript and Presenter's Notes

Title: MATLAB stands for MATrix LABoratory.


1
Introduction
  • MATLAB stands for MATrix LABoratory.
  • Basics
  • Matrix Manipulations
  • MATLAB Programming
  • Graphics
  • Image types
  • Image Processing
  • Useful functions

2
Basics
  • Basic data element is an array that does not
    require dimensioning.
  • A1 2 34 5 6 7 8 9
  • A 1 2 3
  • 4 5 6
  • 7 8 9

3
Matrix Manipulations
  • Sum(A) sums of the columns of A
  • A Transpose of A
  • Diag(A) gives diagonal elements of A
  • Min(A) minimum element column wise of A.
  • Max(A) maximum element column wise of A.
  • Mean(A) Average element column wise of A.
  • Std(A) Standard deviation column wise of A.
  • X zeros(5,5) Y ones(6,6)
  • Mrand(5,5) N randn(6,6)
  • A150
  • A0pi/4pi0 0.7854 1.5708 2.3562 3.1416

4
Matrix Manipulations (contd..)
  • B magic(4) 16 2 3 13
  • Dürer's magic square 5 11 10 8
  • 9 7 6 12
  • 4 14 15 1
  • All numbers are stored internally using the long
    format specified by the IEEE floating-point
    standard.
  • Floating-point numbers have
  • finite precision ?16 significant decimal digits
    and
  • finite range ? 10-308 to 10308.

5
Matrix Manipulations (contd..)
  • A(,2) ? deletes 2nd column.
  • A(2212) results in row vector of remaining
    elements.
  • A A.5 ? Element-by-element multiplication.
  • indices find(isprime(A))
  • format ? this command can be used for formatting
    the displayed numeric output (either in short or
    long format).

6
MATLAB Programming
  • MATLAB has several flow control constructs
  • if statements
  • switch statements
  • for loops
  • while loops
  • continue statements
  • break statements

7
Graphics
  • Plotting sinusoidal function using the plot
    function.
  • Cylinder ? unit cylinder with default 20 points
    on the circumference.
  • Sphere ? unit sphere with default 20 points on
    the circumference.
  • Subplot(m,n,p) ? partitions the figure window
    into m-by-n matrix of small subplots and selects
    the pth subplot for the current plot.

8
Graphics (contd..)
  • mesh ? produces wire frame surfaces that color
    only the lines connecting the defining points.
  • surf ? displays both the connecting lines and the
    faces of the surface in color.
  • Light and camera effect on the visualization of
    2-dim sinc function (i.e. sin(r)/r) between x and
    y directions.

9
Types of Images
  • Index images
  • Intensity images
  • Binary images
  • RGB images

10
Image Processing
  • Dürer's magic square
  • Animation using EraseMode property.
  • Animation using Movie method
  • Functions
  • Imread ? read an image
  • Imwrite ? writes specified matrix into an image.
  • Image ? displays specified matrix as an image.
  • Imshow ? Displays an intensity (gray level)
    image.
  • Im2frame ? converts an image into movie frame.
  • Avifile ? creates an avifile object.
  • Addframe ? adds movie frame to avifile object.
  • Getframe ? returns movie frame.
  • Movie ? Play recorded movie frames.
  • close ? closes current figure.

11
Useful functions
  • help fnName ? help on any function.
  • whos ? information on current variables in the
    workspace.
  • guide ? GUI editor.
  • demo ? Matlab toolboxes and functions demo.
  • eval(str) ? evaluates expression in the str
    variable.
  • load abc.mat ? loads data in the matlab file.
Write a Comment
User Comments (0)
About PowerShow.com