lab05_sol_su09

lab05_sol_su09 - ECE220 Problem Lab #5 Vectors, Matrices...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE220 Problem Lab #5 Vectors, Matrices and Linear Equations I. VectoR and Matrix Operations Solution to Problem 5.8 1. c 1 = ab = - 1 1 1- 1- 3 = - 1 1 3 1- 1- 3 2. c 2 = ab T = - 1 1 1- 1- 3 The multiplication is not legal in this case as the number of columns in a are not equal to number of rows in b T . 3. c 3 = a T b =- 1 1 1- 1- 3 The multiplication is not legal in this case as the number of columns in a T are not equal to number of rows in b. 4. c 4 = a T b T =- 1 1 1- 1- 3 =- 2 1 Solution to Problem 5.9 The following MATLAB script computes all parts for this problem. The solutions to each line of code is included as comments in the script clear clc A = [2 0; -1 -1; 0 -2]; B = [1 1; -2 3; -1 1]; size(A) % [3 2] size(B) % [3 2] At = A % [2 -1 0 % 0 -1 -2] Bt = B % [1 -2 -1 % 1 3 1] S = A+B % [ 3 1 %-3 2 %-1 -1] D = A-B % [1 -1 % 1 -4 % 1 -3] M1 = 3*A % [ 6 %-3 -3 % 0 -6] 2 M2 = 10*B % [ 10 10 %-20 30 %-10 10] D1 = A/2 % [ 1.0 0.0 %-0.5-0.5 % 0.0-1.0] P1 = A*At % [ 4-2 %-2 2 2 % 2 4] T = A(1,:)*Bt % [2 -4 -2] P2 = A*ones(2) % [ 2 2 %-2-2 %-2-2] P3 = A*eye(2) % [ 2 %-1-1 %-2] P4 = eye(3)*A % [ 2 %-1-1 %-2] 3 Solution to Problem 5.12 A = 2 2 1 1- 1...
View Full Document

This note was uploaded on 08/24/2009 for the course ECE 220 taught by Professor Nilson during the Summer '08 term at N.C. State.

Page1 / 10

lab05_sol_su09 - ECE220 Problem Lab #5 Vectors, Matrices...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online