Announcements.

Slides:



Advertisements
Similar presentations
2.3 Modeling Real World Data with Matrices
Advertisements

Maths for Computer Graphics
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Fundamentals of matrices
4.2 Operations with Matrices Scalar multiplication.
COMP 116: Introduction to Scientific Programming Lecture 7: Matrices and Linear Systems.
Working with Arrays in MATLAB
The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Slide Copyright © 2009 Pearson Education, Inc. 7.3 Matrices.
Matrices: Simplifying Algebraic Expressions Combining Like Terms & Distributive Property.
MATRICES MATRIX OPERATIONS. About Matrices  A matrix is a rectangular arrangement of numbers in rows and columns. Rows run horizontally and columns run.
Sec 4.1 Matrices.
Algebra Matrix Operations. Definition Matrix-A rectangular arrangement of numbers in rows and columns Dimensions- number of rows then columns Entries-
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
Matrices. Matrix - a rectangular array of variables or constants in horizontal rows and vertical columns enclosed in brackets. Element - each value in.
Relational and Logical Operators EE 201 1C7-2 Spring 2012.
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
An Introduction to Matrix Algebra Math 2240 Appalachian State University Dr. Ginn.
ECE 1304 Introduction to Electrical and Computer Engineering
13.4 Product of Two Matrices
Linear Algebraic Equations and Matrices
12-1 Organizing Data Using Matrices
Christmas Packets are due on Friday!!!
Linear Algebra review (optional)
1.5 Matricies.
Linear Algebraic Equations and Matrices
Introduction To Matrices
Matrix Operations SpringSemester 2017.
Multiplying Matrices.
WarmUp 2-3 on your calculator or on paper..
7.3 Matrices.
الوحدة السابعة : المصفوفات . تنظيم البيانات فى مصفوفات . الوحدة السابعة : المصفوفات . تنظيم البيانات فى مصفوفات . 1 جمع المصفوفات وطرحها.
Introduction to Matrices
25. Basic matrix operations
Vectorized Code, Logical Indexing
Matrices Elements, Adding and Subtracting
Vectors and Matrices I.
Introduction to MATLAB [Vectors and Matrices] Lab 2
Digital Image Processing
CSCI N207 Data Analysis Using Spreadsheet
Unit 3: Matrices
MATRICES MATRIX OPERATIONS.
1.3 Vector Equations.
2.2 Introduction to Matrices
Matrices.
Multiplying Matrices.
5 minutes Warm-Up Evaluate each expression for a = -5, b = 1.3, and c = -7. 1) a + b 2) b - c 3) a – b + c 4) -4b Solve each equation. 5) 16 = 2x.
Announcements P3 due today
Multi-Dimensional Arrays
Matlab Training Session 2: Matrix Operations and Relational Operators
3.6 Multiply Matrices.
Linear Algebra review (optional)
Matrices An appeaser is one who feeds a crocodile—hoping it will eat him last. Winston Churchhill.
EECS Introduction to Computing for the Physical Sciences
1.8 Matrices.
Matrices.
Matrix Operations Ms. Olifer.
Matrix Operations SpringSemester 2017.
Matrix A matrix is a rectangular arrangement of numbers in rows and columns Each number in a matrix is called an Element. The dimensions of a matrix are.
1.8 Matrices.
Multiplying Matrices.
Working with Arrays in MATLAB
Multiplying Matrices.
Multiplying Matrices.
Announcements.
Announcements.
Announcements Exam 2 Next Week!! Final Exam :
Presentation transcript:

Announcements

Matrices Matrix – Two Dimensional Array MatLab Creation : matrixName = [ 1,3,5;2,4,6 ]; Row – Horizontal Values Column – Vertical Values Element – One Member (Value) in an Array Offset or Subscript – For Matrix, given as Row, Column Pair (e.g., matrixName(1,2) )

Matrix Creation >> matrixOne = [1,2,3;3,4,5]; >> disp(matrixOne) 1 2 3 3 4 5 >> rowV = [9, 10]; >> rowV2 = [11,12]; >> matrixTwo = [rowV;rowV2]; >> disp(matrixTwo) 9 10 11 12

Matrix Addressing >> disp(matrixFour) 1 2 3 9 10 3 4 5 11 12 1 2 3 9 10 3 4 5 11 12 >> disp(matrixFour(1,1)) 1 >> disp(matrixFour(2,5)) 12 >> disp(matrixFour(-3,1)) Subscript indices must either be real positive integers or logicals. >> disp(matrixFour(1,1000)) Index exceeds matrix dimensions. >> matrixFour(1,7) = 1000; 1 2 3 9 10 0 1000 3 4 5 11 12 0 0

Matrix Addressing (Cont) Colon (:) means “all” or range >> disp(matrixFour) 1 2 3 9 10 0 1000 3 4 5 11 12 0 0 >> disp(matrixFour(:,4)) 9 11 >> disp(matrixFour(2,:)) 3 4 5 11 12 0 0

Matrix Addressing (Cont) >> disp(matrixFour) 1 2 3 9 10 0 1000 3 4 5 11 12 0 0 >> disp(matrixFour(:,2:5)) 2 3 9 10 4 5 11 12

Matrix Scalar Operations >> disp(matrixFour) 1 2 3 9 10 0 1000 3 4 5 11 12 0 0 >> disp(matrixFour + 2) 3 4 5 11 12 2 1002 5 6 7 13 14 2 2 >> disp(matrixFour * 2) 2 4 6 18 20 0 2000 6 8 10 22 24 0 0

Matrix Vector Multiplication Number of Cols in Matrix *Must* Equal Number of Rows in Vector >> matrixOne = [1,2,3;4,5,6]; >> vectorOne = [2;2;2]; >> disp(matrixOne); 1 2 3 4 5 6 >> disp(vectorOne); 2 >> disp(matrixOne * vectorOne); 12 30

Matrix Matrix Multiplication Number of Cols in Left Hand Matrix *Must* Equal Number of Rows in Right Hand Matrix >> disp(matrixOne); 1 2 3 4 5 6 >> vectorOne = [2;2;2]; >> matrixTwo = [vectorOne, vectorOne * 2]; >> disp(matrixTwo); 2 4 >> disp(matrixOne * matrixTwo); 12 24 30 60

Matrix Matrix Multiplication Number of Cols in Left Hand Matrix *Must* Equal Number of Rows in Right Hand Matrix >> disp(matrixOne); 1 2 3 4 5 6 >> disp(matrixTwo); 2 4 >> disp(matrixTwo * matrixOne); 18 24 30

>> matrixTwo = [matrixTwo; [1,1]]; >> disp(matrixTwo); >> disp(matrixOne); 2 4 1 2 3 2 4 4 5 6 2 4 1 1 >> disp(matrixTwo * matrixOne); 18 24 30 5 7 9 >> disp(matrixOne * matrixTwo); Error using * Inner matrix dimensions must agree.

>> matrixThree = [2,2;1,1]; >> disp(matrixThree); 2 2 1 1 >> matrixFour = [3,4;5,6] >> disp(matrixFour); 3 4 5 6 >> disp(matrixThree .* matrixFour); 6 8 >> disp(matrixThree * matrixFour); 16 20 8 10

Matrix Exponenent >> disp(matrixTwo) 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 >> disp(matrixTwo.^2) 1 4 9 16 25 36 49 64 81 >> disp(matrixTwo^2) 30 36 42 66 81 96 102 126 150

Matrix Functions >> disp(matrixFive); 9 3 5 0 8 -9 11 16 9 3 5 0 8 -9 11 16 >> disp(sum(matrixFive)) 17 -6 16 16 >> disp(sum(sum(matrixFive))) 43

Matrix Functions >> disp(matrixFive); 9 3 5 0 8 -9 11 16 9 3 5 0 8 -9 11 16 >> disp(max(matrixFive)); 9 3 11 16 >> disp(min(matrixFive)); 8 -9 5 0 >> disp(max(max(matrixFive))); 16

Matrix Functions >> disp(matrixFive); 9 3 5 0 8 -9 11 16 9 3 5 0 8 -9 11 16 >> disp(length(matrixFive)) 4 >> disp(size(matrixFive)) 2 4 >> disp(sort(matrixFive)) 8 -9 5 0 9 3 11 16

Matrix Functions >> disp(vectorOne); 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 >> disp(vectorTwo); 1 4 9 16 25 36 49 64 81 100 >> plot (vectorOne, vectorTwo)

>> disp(vectorOne); 1 2 3 4 5 6 7 8 9 10 >> disp(vectorTwo); 1 4 9 16 25 36 49 64 81 100 >> plot (vectorOne, vectorTwo)

More MatLab Plotting Setting Axes, Grid Marks Labels Plotting Functions Labeling Files Data Files Spreadsheet Files Statistics, Probablity, Higher Math Random Numbers Normal Distribution Linear Equations Calculus