Zen and the Art of MatLab Damian Gordon. Hard work done by : Daphne Gilbert & Susan Lazarus.

Slides:



Advertisements
Similar presentations
Introduction to Matlab
Advertisements

Introduction to Matlab
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
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.
Introduction to Matlab. I use Matlab for: Data analysis Data plotting Image Analysis Also – Simulations (solving odes/pdes/finite element methods) – Minimisations,
EGR 106 – Week 2 – Arrays Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
SPAC Lab, Stevens Work Summary -- Matlab Ning Han, Hongbin Li Department of Electrical and Computer Engineering June 16,
Introduction to MATLAB Week 13 – 4/21/09. Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm
Getting started with Matlab Numerical Methods Appendix B help/techdoc/learn_matlab/learn_matlab.html.
Introduction to MATLAB
What is MATLAB ? MATrix LABratory –Originally, it was a front-end to FORTRAN matrix routines developed in the U. of New Mexico and Stanford –Today.
Chapter 10 Review: Matrix Algebra
ENGR-25_Arrays-2.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Martin Ellison University of Warwick and CEPR Bank of England, December 2005 Introduction to MATLAB.
Nonparametric Econometrics1 Intro to Matlab for Data Analysis and Statistical Modeling.
1 Week 3: Vectors and Matrices (Part III) READING: 2.2 – 2.4 EECS Introduction to Computing for the Physical Sciences.
CSE123 Lecture 5 Arrays and Array Operations. Definitions Scalars: Variables that represent single numbers. Note that complex numbers are also scalars,
1 Lab of COMP 406 Teaching Assistant: Pei-Yuan Zhou Contact: Lab 1: 12 Sep., 2014 Introduction of Matlab (I)
Introduction to MATLAB CBE 502 Mathematical Methods of Engineering Analysis.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Eng Ship Structures 1 Introduction to Matlab.
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Lecture 28: Mathematical Insight and Engineering.
Matlab Programming for Engineers Dr. Bashir NOURI Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
Recap Script M-file Editor/Debugger Window Cell Mode Chapter 3 “Built in MATLAB Function” Using Built-in Functions Using the HELP Feature Window HELP.
MAE 1202: AEROSPACE PRACTICUM An Introduction to MATLAB: Part 2 Mechanical and Aerospace Engineering Department Florida Institute of Technology Developed.
Lecture 2 - Matlab Introduction CVEN 302 June 5, 2002.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
ME6104: CAD. Module 4. ME6104: CAD. Module 4. Systems Realization Laboratory Module 4 Matlab ME 6104 – Fundamentals of Computer-Aided Design.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
1-2 Order of Operations and Evaluating Expressions.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
1 ECE 1304 Introduction to Electrical and Computer Engineering Section 1.7 Linear Algebra with MATLAB.
Ch13-1 Chap 13 Introduction to Matlab 13.1 Introduction MATLAB : The MATrix LABoratory program Not only is the MATLAB programming language exceptionally.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 3: Array Operations Monday 08 Sept 2014 EGR 115 Introduction to Computing for Engineers.
Introduction to Matlab Electromagnetic Theory LAB by Engr. Mian Shahzad Iqbal.
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
Introduction to Engineering MATLAB – 4 Arrays Agenda Creating arrays of numbers  Vectors: 1-D Arrays  Arrays: 2-D Arrays Array Addressing Strings & String.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
Finishing up Chapter 5. Will this code enter the if statement? G=[30,55,10] if G
Introduction to Matlab Engr. Mian Shahzad Iqbal LAB NO.2
BASICS OF MATLAB Engr.Mian Shahzad Iqbal Lecturer,Telecom Department University of Engineering & Technology Taxila.
An Introduction to Programming in Matlab Emily Blumenthal
Array and Matrix Operations EE 201 Fall  Achieve Comprehension LOL of Array and Matrix Operations. Class Learning Objectives 2.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Intro To MATLAB CS Fall 2013 Zach Welch. Overview ●Basics ●MATLAB data structures ●Operations ●Useful functions ●Image Processing and other useful.
ECE 1304 Introduction to Electrical and Computer Engineering
응용 전산 및 실습 MATLAB – Chapter 3 행렬연산
Signals in Matlab Matlab as a name stands for Matrix Laboratory.
L – Modeling and Simulating Social Systems with MATLAB
Lecture: MATLAB Chapter 1 Introduction
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Introduction to Matlab
Matlab Workshop 9/22/2018.
L – Modelling and Simulating Social Systems with MATLAB
Digital Image Processing using MATLAB
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Introduction to MATLAB [Vectors and Matrices] Lab 2
Matlab Basic Dr. Imtiaz Hussain
Introduction to Matlab
-seminar 1 for digital signal processing
Introduction To MATLAB
Presentation transcript:

Zen and the Art of MatLab Damian Gordon

Hard work done by : Daphne Gilbert & Susan Lazarus

Introduction to MatLab MatLab is an interactive, matrix-based system for numeric computation and visualisation MATrix LABoratory Used in image processing, image synthesis, engineering simulation, etc.

References “Mastering MatLab” Duane Hanselman, Bruce Littlefield “The MatLab Primer” at/mat.html “The MatLab FAQ” -faq.html

Printed Circuit Board

Specific Bond Selected

Bond Shape Estimated

MATLAB Command Window To get started, type one of these: helpwin, helpdesk, or demo. For product information, type tour or visit » » help HELP topics:

Creating Variables >> varname = 12 varname = 12 >> SS = 56; N = 4; Tot_Num = SS + N Tot_Num = 60

Operations +Addition -Subtraction *Multiplication ^Power \ Division / Division Add vars Subtract vars Multiplication Raise to the power Divide vars (A div B) Divide vars (B div A)

Creating Complex Numbers >> 3 + 2i >> sqrt(9) + sin(0.5)*j ans = i Num = sqrt(9) + sin(0.5)*j real(Num) imag(Num)

Entering Matrices (1) >> A = [1 2 3; 4 5 6; 7 8 9] OR >> A = [ ]

Entering Matrices (2) To create an NxM zero-filled matrix >> zeros(N,M) To create a NxN zero-filled matrix >> zeros(N) To create an NxM one-filled matrix >> ones(N,M) To create a NxN one-filled matrix >> ones(N)

Entering Matrices (3) To create an NxM randomly-filled matrix (which is uniformly distributed) >> rand(N,M) To create an NxM randomly-filled matrix (which is normally distributed) >> randn(N,M)

Complex Matrices To enter a complex matrix, you may do it in one of two ways : >> A = [1 2; 3 4] + i*[5 6;7 8] OR >> A = [1+5i 2+6i; 3+7i 4+8i]

MATLAB Command Window » who Your variables are: a b c » whos Name Size Bytes Class a 8x8 512 double array b 9x9 648 double array c 9x9 648 double array Grand total is 226 elements using 1808 bytes

Matrix Addition » A = [ ; ; 3 3 3] » B = [3 3 3 ; ; ] » A + B ans =

Matrix Subtraction » A = [ ; ; 3 3 3] » B = [3 3 3 ; ; ] » B - A ans = 2 2 2

Matrix Multiplication » A = [ ; ; 3 3 3] » B = [3 3 3 ; ; ] » A * B ans =

Matrix - Power » A ^ 2 ans = » A ^ 3 ans =

Matrix Transpose A = » A' ans = 1 2 3

Matrix Division Left Division \ x = A\B (is A*x=B) >> A = rand(4) >> B = rand(4) >> C = A \ B => A * C = B Right Division / x=A/B (is x*A=B) >> A = rand(4) >> B = rand(4) >> C = A / B => C * A = B

Matrix Operations +Addition -Subtraction *Multiplication ^Power ‘Conjugate Transpose \ Left Division /Right Division Add matrices Subtract matrices Matrix Multiplication Raise to the power Get transpose x = A\B (is A*x=B) x=A/B (is x*A=B)