hw3_solution_2008

hw3_solution_2008 - Problem 1 Matlab Code %Let's define a...

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

View Full Document Right Arrow Icon
Problem 1 Matlab Code %Let's define a square matrix A=[10 2 -1; -3 -6 2; 1 1 5] %Determinant of A detA = det(A) %Inverse of A invA = inv(A) %Let's see if invA is really the inverse of A I1 = A*inv(A) I2 = inv(A)*A Output A = 10 2 -1 -3 -6 2 1 1 5 detA = -289 invA = 0.1107 0.0381 0.0069 -0.0588 -0.1765 0.0588 -0.0104 0.0277 0.1869 I1 = 1.0000 0.0000 0 0.0000 1.0000 0.0000 -0.0000 0.0000 1.0000
Background image of page 1

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

View Full DocumentRight Arrow Icon
I2 = 1.0000 0.0000 0.0000 -0.0000 1.0000 0.0000 0 0 1.0000
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Problem 2 Matlab Code: A = [-cos(pi/6) 0 cos(pi/3) 0 0 0; -sin(pi/6) 0 -sin(pi/3) 0 0 0; cos(pi/6) 1 0 1 0 0; sin(pi/6) 0 0 0 1 0; 0 -1 -cos(pi/3) 0 0 0; 0 0 sin(pi/3) 0 0 1]; b = [0; 1000; 0; 0; 0; 0]; forces = A\b Output forces = -500.0000 433.0127 -866.0254 0 250.0000 750.0000
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
PROBLEM 4: BOOK PROBLEM 8.5 Mass balance equations for the 5 tanks can be written by following the figure given with the problem: TANK 1: -3C1-3C1+1C3=-5C 01 TANK 2: -1C2-1C2-1C2+3C1=0 TANK 3: -8C3+1C2-1C3=-8X20 TANK 4: -11C4+8C3+2C5+1C2=0 TANK 5: -2C5-2C5+3C1+1C2=0
Background image of page 9

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

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

Page1 / 18

hw3_solution_2008 - Problem 1 Matlab Code %Let's define a...

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

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