# MATLAB Assignment 4-math 20D.pdf - Exercise 4.1 a Define B...

• Homework Help
• 10
• 100% (10) 10 out of 10 people found this document helpful

This preview shows page 1 - 5 out of 10 pages.

Exercise 4.1a.Define Bas the matrix [1.22.540.7b.Find the eigenvalues and eigen vectors of B]. >> B= [1.2, 2.5; 4, 0.7] B = 1.2000 2.5000 4.0000 0.7000 >> [eigvec, eigval] = eig(B) eigvec = 0.6501 -0.5899 0.7599 0.8075 eigval = 4.1221 0 -2.2221
0
Exercise 4.2(4) dxdt= 3x + 4ydydt= -x - 2ya.When system (4) is put in the form v’=Av, the matrix A= [34−1−2]MATLAB Input and Output: b.Eigenvalues and eigenvectors of matrix A: c.Using formula (2) and the results from part (b) of this exercise, the general solution of this system is v(t) = 𝑐1∙ 𝑒2∙𝑡[0.9701−0.2425] + 𝑐2∙ 𝑒−𝑡[−0.70710.7071]As t gets large, the solutions to the system tend to infinity. (2) v(t) = c1·eλ1·t b1+ c2·eλ2·tb2>> A = [3, 4; -1, -2] A = 3 4 -1 -2 >> [eigvec, eigval] = eig(A) eigvec = 0.9701 -0.7071 -0.2425 0.7071 eigval = 2 0 0 -1
>> A = [2.7, -1; 4.1, 3.7] A = 2.7000 -1.0000 4.1000 3.7000 >> [eigvec, eigval] = eig(A) eigvec = -0.1093 + 0.4291i -0.1093 - 0.4291i 0.8966 + 0.0000i 0.8966 + 0.0000i eigval = 3.2000 + 1.9621i 0.0000 + 0.0000i 0.0000 + 0.0000i 3.2000 - 1.9621i d.The plot does support my answer to ( c). Exercise 4.3a.[?′?′] = [2.7−14.13.7] ∙ [??]Matrix A= [2.7−14.13.7]>> g = @(t,Y) [3*Y(1) + 4*Y(2); -Y(1) - 2*Y(2)]; P = [ -2,0; -3,2; -2,-3; -1,3; 0,-3; 1,4; 2,-3; 3,-2; 3,0; 3,2]; phaseplane(g, [-5,5], [-5,5], 25) hold on for i=1:size(P,1) drawphase(g, 50, P(i,1), P(i,2)) end hold off
(6) dxdt= 2.7x - ydydt= 4.1x + 3.7yb.
• • • 