This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 = AB % [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.50.5 % 0.01.0] P1 = A*At % [ 42 %2 2 2 % 2 4] T = A(1,:)*Bt % [2 4 2] P2 = A*ones(2) % [ 2 2 %22 %22] P3 = A*eye(2) % [ 2 %11 %2] P4 = eye(3)*A % [ 2 %11 %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.
 Summer '08
 NILSON

Click to edit the document details