CS 1371 Review Session 3[1] (2)

# CS 1371 Review Session 3[1] (2) - CS 1371 Review Session 3...

This preview shows pages 1–9. Sign up to view the full content.

CS 1371 Review Session 3 Electronic Test Bring your Buzzcard and show up to your usual Recitation time. If your computer does not meet the following requirements, you should e-mail your TA ASAP, since you will need to take your test in help desk: Laptop with a battery life > 1.0 hours CD Drive Wireless Connection to LAWN Study the Test Prep coding questions from the last homework, practice test, and ABCs online quizzes. Created By: Dilan D. Manatunga ©2009

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS 1371 Test 3 Topics Matrices Images Numerical Methods Sound Sorting
Matrices Three Main Topics to Matrices: Matrix Math Solving Systems of Equations 2-D Rotation Matrix Matrices are really just arrays. The usual stuff done with arrays, such as creation, indexing, splicing, concatenation, etc., applies the same to Matrices. The only real difference between matrices and arrays is when doing mathematical operations.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Matrix Math When doing Matrix Math in MATLAB, remember to not use the dot when doing multiply, divide, or exponentiation. Matrix Multiply C = A*B; NOT C = A.*B; Matrix Divide C = A/B; NOT C = A./B; Matrix Exponentiation C = A^(-1); NOT C = A.^(-1);
Matrix Multiplication Rules (C = A*B) The order of the multiplication matters. A*B ≠ B*A The number of columns of A must equal the number of rows of B. So, if A is a MxN matrix, then B should be a NxP matrix. The dimensions of the resultant matrix will be the number of rows of A by the number of columns of B. So, if A is a MxN matrix and B is a NxP matrix, then C will be a matrix of dimensions MxP.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Solving Systems of Equations MATLAB can solve Systems of Equations similar to the methods used in Linear Algebra. Essentially, we are taking the systems of equations and describing it in terms of matrix multiplication. n m nm n n m m b b b x x x a a a a a a a a a 2 1 2 1 2 1 2 22 21 1 12 11 * b x A n m nm n n m m m m b x a x a x a b x a x a x a b x a x a x a 2 2 1 1 2 2 2 22 1 21 1 1 2 12 1 11
Finding the Matrices The first step to solving the systems of equations is to find the coefficient matrix and the vector of constants. Example: Coefficient Matrix Each row contains the coefficients of a specific equation, while each column contains the coefficients of a specific variable, such as x, y, or z. A = [2, 3; 1 -2]; Vector of Constants Each row contains the constant portion of the equation. b = [9; -13]; 13 2 9 3 2 y x y x 13 9 * 2 1 3 2 y x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Common Mistakes in Creating the Coefficient Matrix Example: For this example, the variable A will contain the coefficient matrix, while the variable b will contain the constant vector.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern