Introduction to MATLAB II Steve Gu Jan 25, 2007. Outline Matrix Operation –Matrix functions –Element-wise operations Dynamic Systems –Classification –2nd.

Slides:



Advertisements
Similar presentations
S i m u l i n k Prof. Muhammad Saeed Mathematical Modeling and Simulation UsingMATLAB 1.
Advertisements

1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 10.
Managerial Decision Making and Problem Solving Computer Lab Notes 1.
E ngineering College of San Jose State University Engr.10 1 JKA & KY.
Introduction to Powerschool and Excel Jared Schatz Staff Accountant (509)
Slide deck by Dr. Greg Reese Miami University MATLAB An Introduction With Applications, 5 th Edition Dr. Amos Gilat The Ohio State University Chapter 3.
Matrix Multiplication, Part 2a V T S Pizza Drink Salad What if your group wants to buy 1 pizza, 3 drinks, and 3 salads? Or 2 pizzas, 4 drinks, and 3 salads?
Matrices, Digraphs, Markov Chains & Their Use. Introduction to Matrices  A matrix is a rectangular array of numbers  Matrices are used to solve systems.
Matrices. Special Matrices Matrix Addition and Subtraction Example.
Lecture 7 Sept 19, 11 Goals: two-dimensional arrays (continued) matrix operations circuit analysis using Matlab image processing – simple examples Chapter.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
EGR 106 – Week 4 – Math on Arrays
HossamTalaat - MATLAB Course - KSU - 21/1/24 1 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink By Prof. Hossam Talaat.
Dr. Jie Zou PHY Welcome to PHY 3320 Computational Methods in Physics and Engineering.
Simulink ® From Simulink® 7 Getting Started Guide.
Matrix Mathematics in MATLAB and Excel
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Section 8.1 – Systems of Linear Equations
1 Chapter 3 Matrix Algebra with MATLAB Basic matrix definitions and operations were covered in Chapter 2. We will now consider how these operations are.
An Introduction to Scilab Tsing Nam Kiu 丁南僑 Department of Mathematics The University of Hong Kong 2009 January 7.
Chapter 10 Review: Matrix Algebra
Academy Algebra II/Trig
COMP 116: Introduction to Scientific Programming Lecture 7: Matrices and Linear Systems.
1.1.2 INTRODUCTION TO SYSTEMS OF LINEAR EQUATIONS Chapter 1: Systems of Linear Equations and Matrices SWBAT: Redefine algebraic operations as Elementary.
Introduction to MATLAB Session 1 Prepared By: Dina El Kholy Ahmed Dalal Statistics Course – Biomedical Department -year 3.
Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,
MATLAB Tutorials Session I Introduction to MATLAB Rajeev Madazhy Dept of Mechanical Engineering LSU.
1-7 Data and Spread Big Idea Two measures of the spread of a data set are range and mean absolute deviation. Range, the difference between the maximum.
1 Week 3: Vectors and Matrices (Part III) READING: 2.2 – 2.4 EECS Introduction to Computing for the Physical Sciences.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Learner’s Guide to MATLAB® Chapter 2 : Working with Arrays.
INTRODUCTION TO MATLAB LAB# 01
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Lecture 28: Mathematical Insight and Engineering.
Algebra 3: Section 5.5 Objectives of this Section Find the Sum and Difference of Two Matrices Find Scalar Multiples of a Matrix Find the Product of Two.
Regensburg, 24. – Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory.
OUTLINE Overview Numbers, variables and similar in Matlab
Introduction to Matlab and Simulink
MA/CS 375 Fall 2002 Lecture 3. Example 2 A is a matrix with 3 rows and 2 columns.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VII Introduction to SIMULINK Rajeev Madazhy
Introduction to Linear Algebra Mark Goldman Emily Mackevicius.
8.2 Operations With Matrices
Simulink Simulink is a graphical extension to MATLAB for modeling and simulation of systems. In Simulink, systems are drawn on screen as block diagrams.
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
Copyright © Cengage Learning. All rights reserved. 2 SYSTEMS OF LINEAR EQUATIONS AND MATRICES Warm Up Read pp up to and including the box labeled.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
Copyright © 2005 by Nelson, a division of Thomson Canada Limited 14-0 EXCEL CHAPTER 14 PHILIP BEDIENT.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Finishing up Chapter 5. Will this code enter the if statement? G=[30,55,10] if G
Matlab Tutorial Iman Moazzen First Session – September 11, 2013.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
HossamTalaat - MATLAB Course - KSU - 17/08/14231 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink (part 2) By Prof. Hossam.
Getting started with Simulink An introductory tutorial.
An Introduction to Matrix Algebra Math 2240 Appalachian State University Dr. Ginn.
MTH108 Business Math I Lecture 20.
Introduction to Matlab and Simulink
Signals in Matlab Matlab as a name stands for Matrix Laboratory.
EGR 106 – Week 4 – Math on Arrays
MATLAB DENC 2533 ECADD LAB 9.
Multiplicative Inverses of Matrices and Matrix Equations
Getting Started With Simulink
Objectives Multiply two matrices.
3.6 Multiply Matrices.
Section 8.1 – Systems of Linear Equations
Presentation transcript:

Introduction to MATLAB II Steve Gu Jan 25, 2007

Outline Matrix Operation –Matrix functions –Element-wise operations Dynamic Systems –Classification –2nd  1st Order Equations Introduction to Simulink

Part I Matrix Operation –Matrix functions –Element-wise operations

Matrix Functions Many mathematical functions work on the individual entries of a matrix or vector For example, abs(M) takes the absolute value of each entry of M : >> abs( [ ; ] ) Other such functions are sin, cos, sqrt, etc.

Matrix Functions Many functions work on the columns of matrices Example, the max function: –max(v) finds the maximum entry of a vector –max(M) returns a row vector containing the maximum entry of each column of a matrix –max(max((M)) returns the maximum entry a matrix

Matrix Functions >> max( [ ] ) 5 >> M = [ ; ; ; ] >> max( M ) % maximum in each column >> max( M’ ) % maximum in each row

Similar Functions Similar functions include: –max min sum –mean sort >> M = [1 2 3; 4 5 6; 7 8 9] >>sum( M ) >> min( M ) 1 2 3

Similar Functions Some functions work on the entire column: –sort >> M = rand( 3, 6 ) >> sort( M )

Matrix Functions some mathematical functions work on the entire matrix For example, det(M) takes the determinant of matrix M : >> det( [1 2;3 4] ) >>ans -2 Other such functions are eig, norm, cond, etc.

Element-wise Products How have heard repeatedly that if A = (a i,j ) and B = (b i,j ) are matrices, then AB means matrix multiplication: Often though, the simple product is useful:

Element-wise Products Matlab allows you to do this with the.* operator: >> A = [1 2 3; 4 5 6] >> B = [1 2 4; ] >> A.* B

Element-wise Powers You also learned that if A = (a i,j ) then A n means repeated matrix multiplication: Again, sometimes you just want to raise each entry to an exponent:

Element-wise Powers Matlab allows you to do this with the.^ operator: >> A = [1 2 3; 4 5 6] >> A.^ >> A.^

Dot Product Note that matrix multiplication is a series of dot products: >> A = [1 2; 3 4]; >> B = [2 3; 5 7]; >> A*B >> [A(1,:)*B(:,1) A(1,:)*B(:,2) A(2,:)*B(:,1) A(2,:)*B(:,2)];

Part II Dynamic Systems –Classification –2nd  1st Order Equations

Dynamic Systems What we consider is Linear, Deterministic, Stationary, Discrete Dynamic Systems:

Last Week… The equation for the motion: Remark: Second Order Difference Equation

2nd  1st Order Equations

Also, we have: G=0, H=[1,0] Therefore, we’ve reduced 1 second order equation to a system of 2 first order equations

Part III Introduction to Simulink

Starting Simulink 1.Start MATLAB 2.Click the Simulink icon on MATLAB toolbar; Enter the simulink command at the MATLAB prompt 3.Starting Simulink displays the Simulink Library Browser

Simulink Library Browser Displays a tree-structured view of the Simulink block libraries

Signal Generator Generate various waveforms Parameters and Dialog Box

Simulation Parameters Set the simulation parameters by choosing Simulation Parameters from the Simulation menu

Starting the Simulation Pull down the Simulation menu and choose the Start command (or Ctrl+T) Ctrl+T

Blocksets Blocksets are specialized collections of Simulink blocks built for solving particular classes of problems

A Working Example

Results & Demo

The End Thank you Q&A