MATLAB4 20d - Student Harikrishnan KuppusamyKrishnan ID...

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

Student: Harikrishnan KuppusamyKrishnan ID#: A10313361 MATH 20D:Professor Chris Tiee MATLAB ASSIGNMENT 4 SECTION – D05 Tuesday 8pm TA:Kuangyi Yang Exercise 4.1 4.1a.) Code: B=[1.2, 2.5; 4, 0.7] Output: B = 1.2000 2.5000 4.0000 0.7000 4.1b.) Code: [eigvec,eigval]=eig(B) Output: eigvec = 0.6501 -0.5899 0.7599 0.8075 eigval = 4.1221 0 0 -2.2221
Exercise 4.2 a.) Code: A=[1,3; -1, -8] Output: A = 1 3 -1 -8 b.) Code: >> [eigvec, eigval] = eig(A) Output: eigvec = 0.9934 -0.3276 -0.1148 0.9448 eigval = 0.6533 0 0 -7.6533 c.) v(t) = (0.9934)c 1 e 0.6533 (-0.3276)c 2 e -7.6533 (-0.1148) c 1 e 0.6533 (0.9448) c 2 e -7.6533
d.) Code: g = @(t,Y) [1*Y(1) + 3*Y(2); -1*Y(1) - 8*Y(2)]; P = [-3,3; -3,0; -3,2; -2,-3; -1,3; 0,-3; 1,4; 2,-3; 4,-2; 4,0; 4,2]; phaseplane(g, [-4.5,4.5], [-4.5,4.5], 16) hold on for i=1:size(P,1) drawphase(g, 50, P(i,1), P(i,2)) end hold off Output: The phase plane matches the general solution dictated by c.
Exercise 4.3 a.) Code: A=[2.7, -1; 4.2, 3.5] [eigvec, eigval] = eig(A) Output: A = 2.7000 -1.0000 4.2000 3.5000 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.) v(t) = ( -0.0856 + 0.4301i )c 1 e 3.1+2.01i ( -0.0856 - 0.4301i )c 2 e -7.6533 ( 0.8987 + 0.0000i ) c 1 e 0.6533 ( 0.8987 + 0.0000i ) c 2 e -7.6533
c.) Code: >> g = @(t,Y) [2.7*Y(1) + -1*Y(2); 4.1*Y(1) + 3.7*Y(2)]; P = [-3,3; -3,0; -3,2; -2,-3; -1,3; 0,-3; 1,4; 2,-3; 4,-2; 4,0; 4,2]; phaseplane(g, [-4.5,4.5], [-4.5,4.5], 16) hold on for i=1:size(P,1) drawphase(g, 50, P(i,1), P(i,2)) end hold off Output:
Exercise 4.4 a.) Code: A = [1.25, -.97, 4.6; -2.6, -5.2, -.31; 1.18, -10.3, 1.12]

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture