# MATH20D MATLAB#4 - MATLAB Assignment#4 Exercise 4.1 a >...

• Lab Report
• 8
• 100% (14) 14 out of 14 people found this document helpful

This preview shows page 1 - 8 out of 8 pages.

MATLAB Assignment #4 Exercise 4.1 a. >> B=[1.2,2.5;4,0.7] B = 1.2000 2.5000 4.0000 0.7000 b. >> [eigvec, eigval] = eig(B) eigvec = 0.6501 -0.5899 0.7599 0.8075 eigval = 4.1221 0 0 -2.2221 Exercise 4.2 a. b. >> A = [1,3;-1,-8] A =
1 3 -1 -8 >> [eigvec, eigval] = eig(A) eigvec = 0.9934 -0.3276 -0.1148 0.9448 eigval = 0.6533 0 0 -7.6533 c. d.
x ' = x + 3 y   y ' = - x - 8 y             -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 x y Exercise 4.3 a. >> A = [2.7 -1; 4.2 3.5] A = 2.7000 -1.0000 4.2000 3.5000 >> [eigvec, eigval] = eig(A) eigvec = -0.0856 + 0.4301i -0.0856 - 0.4301i 0.8987 + 0.0000i 0.8987 + 0.0000i eigval =
3.1000 + 2.0100i 0.0000 + 0.0000i 0.0000 + 0.0000i 3.1000 - 2.0100i b. c. x ' = 2.7 x - y     y ' = 4.2 x + 3.5 y             -2 -1 0 1 2 3 4 -4 -3 -2 -1 0 1 2 x y The real part of the eigenvalues causes to solutions to go to infinity as t gets larger. Exercise 4.4 a. >> A = [1.25, -.97, 4.6; -2.6, -5.2, -.31; 1.18, -10.3, 1.12] A = 1.2500 -0.9700 4.6000
-2.6000 -5.2000 -0.3100 1.1800 -10.3000 1.1200 >> eig(A) ans = 5.5698 + 0.0000i -4.1999 + 2.6606i -4.1999 - 2.6606i b. The system is unstable because any system that has even one positive eigenvalue will be unstable. Exercise 4.5 a. >> A = [-0.0558 -0.9968 0.0802 0.0415; 0.598 -0.115 -0.0318 0; -3.05 0.388 -0.4650 0; 0 0.0805 1 0] A = -0.0558 -0.9968 0.0802 0.0415 0.5980 -0.1150 -0.0318 0 -3.0500 0.3880 -0.4650 0 0 0.0805 1.0000 0 >> eig(A) ans = -0.0329 + 0.9467i -0.0329 - 0.9467i
-0.5627 + 0.0000i -0.0073 + 0.0000i b. This system is stable because the eigenvalues are negative values, so the solution goes towards zero.
• • • 