MATLAB® Introduction

             游懷祖
       AOCS/ME Dept, NSPO
         2006, March 02
捕魚的方法
• Online help:
  – http://www.mathworks.com
  – Home  Support  Product Documentation 
    “fishes” (HTML or PDF f...
Before Getting Started…

 MATLAB: core program.
 MATLAB Toolboxes: extended
   program  M-files (or p-files).
 Simulin...
Outline

• MATLAB
  – Mathematics
  – Graphics
  – Programming
• Simulink
  – Graphic User Interface (GUI) block diagram
 ...
Integrated Design Environment
Mathematics
• Matrix-based representation
Mathematics Examples
Ex1: State transition matrix   Ex2: eigenvalue &
                               singular value decomp...
Graphics
• Basic graphic commands:




• Specialized plots & animation (make AVI movies):
  pie, histogram, contour plot, ...
Graphic Examples
  Ex1: signal plot   Ex2: image conversion
Programming

• Data type (class):
  number (double),
  string (char), cell,
  logic, handle, etc.    Function handle Ex.

...
Programming Example (script)
Programming Example (function)
Simulink

• Choosing a solver: continuous/discrete
• Import/Export data
• Configuration sets/parameters
• Integrated with ...
Simulink Example
                                                              Scope
                                     ...
Upcoming SlideShare
Loading in …5
×

Matlab Intro

848 views

Published on

Introduction to MATLAB/Simulink

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
848
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
38
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Matlab Intro

  1. 1. MATLAB® Introduction 游懷祖 AOCS/ME Dept, NSPO 2006, March 02
  2. 2. 捕魚的方法 • Online help: – http://www.mathworks.com – Home  Support  Product Documentation  “fishes” (HTML or PDF files) • Offline help: – F1 key  help – Demos • Help  Demos • $MATLAB71/demos/*.swf (flash example movies) – Books
  3. 3. Before Getting Started…  MATLAB: core program.  MATLAB Toolboxes: extended program  M-files (or p-files).  Simulink: GUI block diagram.  Simulink Blocksets: extended Simulink. Tonight: only (1) (75%) & (3) (25%).
  4. 4. Outline • MATLAB – Mathematics – Graphics – Programming • Simulink – Graphic User Interface (GUI) block diagram modeling
  5. 5. Integrated Design Environment
  6. 6. Mathematics • Matrix-based representation
  7. 7. Mathematics Examples Ex1: State transition matrix Ex2: eigenvalue & singular value decomposition
  8. 8. Graphics • Basic graphic commands: • Specialized plots & animation (make AVI movies): pie, histogram, contour plot, getframe, etc. • Graphic handles: get, set commands; gcf, gca. • Figure save, export, print, etc.
  9. 9. Graphic Examples Ex1: signal plot Ex2: image conversion
  10. 10. Programming • Data type (class): number (double), string (char), cell, logic, handle, etc. Function handle Ex. • Function handle: using @ or inline command • Script vs. Function • Array vs. For-loop
  11. 11. Programming Example (script)
  12. 12. Programming Example (function)
  13. 13. Simulink • Choosing a solver: continuous/discrete • Import/Export data • Configuration sets/parameters • Integrated with MATLAB workspace, M-files, C/C++  S- function • Advanced level: Stateflow, Real-Time Workshop, xPC Target
  14. 14. Simulink Example Scope w y XY Graph -C- J RotEOM y dot x 1 T xo s MOI q Euler Rotational Integrator y q tip pos Eq. of motion -C- [w0,q0] z body z-axis Pulse tip trajectory Terminator Generator [0 0 1] b3 Matrix DCM Multiply 1 1 q be tip q Product q2c pos Masked subsystem

×