summaryrefslogtreecommitdiff
path: root/191/CH4/EX4.4/Example4_4.sce
blob: dce228d08cbc3ed76ca3cfa14391c95cf189f8be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Deflation
clc;
clear;
close();
A = [10 -6 -4; -6 11 2; -4 2 6];
P = [1 0 0;-1 1 0;-0.5 0 1];
disp(P,A,'The A and the P(transformation matrix) are : ');
B = inv(P)*A*P;
disp(B,'Hence B = ')
C = B;
C(1,:) = [];
C(:,1) = [];
disp(C,'The deflated matrix : ');
Y = spec(C);
disp(Y,'The matrix A therefore has  eigen values : ');
e1 = [1/3,1,-1/2]';
e2 = [2/3,1,1]';
disp(e1,e2,'The eigen values of B are : ');
x1 = P*e1;
x2 = P*e2;
disp(3/2.*x1,3/2.*x2,'The eigen vextors of the orginal matrix A : ')