aboutsummaryrefslogtreecommitdiffstats
path: root/math2373/lab8.txt
blob: baa88c9205f19a2c5514c468316f9f8c2bc4628d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
diary off
diary off
A=[4 -3; -7 8]

A =

     4    -3
    -7     8

[P,D]=eig(A)

P =

   -0.7071    0.3939
   -0.7071   -0.9191


D =

     1     0
     0    11

c=inv(P)*[10;-5]

c =

   -7.7782
   11.4237

R=[c(1) 0 0; 0 c(2) 0], E=P*R

R =

   -7.7782         0         0
         0   11.4237         0


E =

    5.5000    4.5000         0
    5.5000  -10.5000         0

R=[c(1) 0; 0 c(2)], E=P*R

R =

   -7.7782         0
         0   11.4237


E =

    5.5000    4.5000
    5.5000  -10.5000

A=[12 -7 4;6 -1 1;-12 12 -7];
[P,D]=eig(A)

P =

    0.2024    0.7071    0.2617
   -0.1215    0.7071    0.7328
   -0.9717    0.0000    0.6281


D =

   -3.0000         0         0
         0    5.0000         0
         0         0    2.0000

c= inv(P)*[10;20;25]

c =

  -21.6109
   17.9723
    6.3683

c= inv(P)*[-10;20;25]

c =

   27.7855
  -52.7384
   82.7882

R=[c(1) 0 0; 0 c(2) 0; 0 0 c(3)], E=P*R

R =

   27.7855         0         0
         0  -52.7384         0
         0         0   82.7882


E =

    5.6250  -37.2917   21.6667
   -3.3750  -37.2917   60.6667
  -27.0000   -0.0000   52.0000

clear
A=[0 0 1 0; 0 0 0 1; 25 18 0 0; 12 40 0 0];
[P,D]=eig(A)

P =

    0.0849    0.2169    0.0849    0.2169
    0.1131   -0.1085    0.1131   -0.1085
    0.5940    0.8677   -0.5940   -0.8677
    0.7920   -0.4339   -0.7920    0.4339


D =

    7.0000         0         0         0
         0    4.0000         0         0
         0         0   -7.0000         0
         0         0         0   -4.0000

c= inv(P)*[23;16;69;0]

c =

  104.2294
   47.3549
   72.5473
  -10.4768

R=[c(1) 0 0 0; 0 c(2) 0 0; 0 0 c(3) 0; 0 0 0 c(4)], E=P*R

R =

  104.2294         0         0         0
         0   47.3549         0         0
         0         0   72.5473         0
         0         0         0  -10.4768


E =

    8.8442   10.2727    6.1558   -2.2727
   11.7922   -5.1364    8.2078    1.1364
   61.9091   41.0909  -43.0909    9.0909
   82.5455  -20.5455  -57.4545   -4.5455

diary of