EGR 301 HW 1: Matlab Review ANSWERS Problem #1: Circuit analysis by inspection R = 6 -2 0 % input data, derived from circuit inspection -2 12 -2 0 -2 7 V = 12 % input data, derived from circuit inspection -8 -20 I = 1.6991 % Answer: i1, i2 and i3 -0.9027 -3.1150 Problem #2: Matrix manipulation A = 1 2 3 4 % initial matrix, different for each person 2 3 4 5 6 7 8 9 5 6 3 2 B = 1 2 3 4 % Row 3 removed from matrix A 2 3 4 5 5 6 3 2 C = 1 2 % Columns 1 and 2 from matrix A 2 3 6 7 5 6 D = 3 4 % Center 4 elements from matrix A 7 8 E = 1 0 0 0 % Diagonal matrix of matrix A's diagonal elements 0 3 0 0 0 0 8 0 0 0 0 2 F = 2.0000 % Column vector of specified data points 2.5000 3.0000 3.5000 4.0000 4.5000 5.0000