Lecture 4. Matlab Basics Getting started 2D-Plots Dr. Holbert F06-Lect1 Lecture 4. Matlab Basics Getting started 2D-Plots Matrix & Linear Equations EEE 202
Getting Started Matlab program can be found at: apps.asu.edu.
Getting Started Tutorials and demos can be found at http://www.mathworks.com/products/matlab/demos.html?show=demo Getting Started with MATLAB (4 min 58 sec) Working in The Development Environment (4 min 13 sec) Writing a MATLAB Program (5 min 36 sec)
2D Plots Tutorials and demos for 2D plots can be found at http://www.mathworks.com/products/matlab/demos.html?file=/products/demos/shipping/matlab/graf2d.html
Matrix and Linear Equations Linear Equations (n-variables and m-equations) ….. Matrix representation Ax=b
Matrix and Linear Equations Ax=b Matrix representation: x=A-1b Solution: Matlab representation x=b/A
Matrix and Linear Equations An example Solve the problem with Matlab Step 1 >> A=[-2 1 3;1 1 0; 0 3 -1] Step 2 >> b=[0;1.5;0] Step 3 >> i=b/A
Matrix and Linear Equations What if Solve the problem with Matlab Step 1 >> A=[-2 1 3;1 1 0; 0 3 -1] Step 2 >> b=[0;1.5;0] Step 3 >> i=b/A Step 3 Multiply the results by is
Matrix and Linear Equations What if the same BUT Using the superposition principle!
Matrix and Linear Equations Re-write the equation as and Solve one at a time and add the results according to