summaryrefslogtreecommitdiff
path: root/191/CH4/EX4.12/Example4_12.sce
diff options
context:
space:
mode:
Diffstat (limited to '191/CH4/EX4.12/Example4_12.sce')
-rwxr-xr-x191/CH4/EX4.12/Example4_12.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/191/CH4/EX4.12/Example4_12.sce b/191/CH4/EX4.12/Example4_12.sce
new file mode 100755
index 000000000..c205c7fae
--- /dev/null
+++ b/191/CH4/EX4.12/Example4_12.sce
@@ -0,0 +1,16 @@
+//stable LR method
+clc;
+clear;
+close();
+format('v',7);
+A = [2 1 3 1;-1 2 2 1;1 0 1 0;-1 -1 -1 1];
+disp(A, 'A = ');
+for i = 1:6
+ [L,R,P]= lu(A);
+ A = R*P*L;
+ disp(A,R,L,'The L R and A matrix are : ');
+end
+disp(A,'The (1,1) and (4,4) elements have converged to real eigenvalues')
+X = [A(2,2) A(2,3);A(3,2) A(3,3)];
+E = spec(X);
+disp(E,'Although submatrix themselves are not converging their eigen values converges.') \ No newline at end of file