summaryrefslogtreecommitdiff
path: root/191/CH4/EX4.12/Example4_12.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /191/CH4/EX4.12/Example4_12.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
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