summaryrefslogtreecommitdiff
path: root/70/CH5/EX5.3.1/5_3_1.sci
blob: 589c51652965a900156fe5733144a19932cf1623 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//page 249
clear;
close;
clc;
A=[0 4;0 1/2];
disp(A,'A=');
eig=spec(A);
disp(eig,'Eigen values:')
[v,D]=spec(A);
u0=[v(:,1)];//Taking u0 as the 1st eigen Vector.
for k=0:5
    disp(k,'k=');
    u=A*u0;
    disp(u,'U(k+1)(K from 0 to 5)')
    u0=u;
end
u0=[v(:,2)];//Taking u0 as the 2nd eigen vector.
for k=0:5
    disp(k,'k=');
    u=A*u0;
    disp(u,'U(k+1)=')
    u0=u;
end