MATH 20D MATLAB HW4
MATH 20D MATLAB HW4
1
a) Input:
B = [1.2 2.5;4 0.7]
Output:
B=
1.2000 2.5000
4.0000 0.7000
b) Input
[P,D] = eig(B)
4.2
a) Input
A = [2 4;-1 -3]
Output
A=
2 4
-1 -3
b) Input
[P,D] = eig(A)
0.9701 -0.7071
-0.2425 0.7071
D=
1 0
0 -2
4.3
a) Input
C = [4.1 -3.7;2.7 1]
[Pc,Dc] = eig(C)
Output
C=
4.1000 -3.7000
2.7000 1.0000
Pc =
0.7603 + 0.0000i 0.7603 + 0.0000i
0.3185 - 0.5661i 0.3185 + 0.5661i
Dc =
2.5500 + 2.7545i 0.0000 + 0.0000i
0.0000 + 0.0000i 2.5500 - 2.7545i
4.4
a) Input
A = [1.25, -0.97, 4.6; -2.6, -5.2, -0.31; 1.18, 10.3, 1.12]
[Pa,Da] = eig(A)
Output
A=
1.2500 -0.9700 4.6000
-2.6000 -5.2000 -0.3100
1.1800 10.3000 1.1200
Pa =
-0.4591 + 0.0000i 0.7862 + 0.0000i 0.7862 + 0.0000i
-0.5199 + 0.0000i -0.2481 + 0.0826i -0.2481 - 0.0826i
0.7204 + 0.0000i 0.0961 + 0.5516i 0.0961 - 0.5516i
Da =
-7.0663 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 2.1181 + 3.1253i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 2.1181 - 3.1253i
b) It is an unstable system because at least one of the real parts of the eigenvalues is
positive.
4.5
a) Input
A = [-0.0558 -0.9968 0.0802 0.0415;
0.598 -0.115 -0.0318 0;
-3.05 0.388 -0.465 0;
0 0.0805 1 0]
B = [0.01; -0.175; 0.153; 0]
[Pa,Da] = eig(A)
Output
B=
0.0100
-0.1750
0.1530
0
Pa =
b) It is asymptotically stable
c) The 4th component is the largest, the type of rotation this eigenvector is most closely associated
to pitch
4.6
a) Input
B = [0.01;-0.175;0.153;0]
F = [0 7 0 -1]
BF = B*F
Output
BF =
0 0.0700 0 -0.0100
0 -1.2250 0 0.1750
0 1.0710 0 -0.1530
0 0 0 0
b) Input
B = [0.01;-0.175;0.153;0]
F = [0 5 0 -0.1]
BF = B*F
Output
BF =
0 0.0500 0 -0.0010
0 -0.8750 0 0.0175
0 0.7650 0 -0.0153
0 0 0 0
c) Input
A = [-0.0558 -0.9968 0.0802 0.0415;
0.598 -0.115 -0.0318 0;
-3.05 0.388 -0.465 0;
0 0.0805 1 0]
B = [0.01;-0.175;0.153;0]
F = [0 5 0 -0.1]
BF = B*F;
ABF = A + B*F
[Pa,Da] = eig(A)
[Pabf,Dabf] = eig(ABF)
Output
Da =
Dabf =
-0.3400 + 0.8104i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i -0.3400 - 0.8104i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i -0.0883 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.7425 + 0.0000i
All real parts of complex eigenvalues are less than -0.2, there is at least one real eigenvalue that
is within 0.02 or 0.