summaryrefslogtreecommitdiff
path: root/191/CH4/EX4.1
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.1
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.1')
-rwxr-xr-x191/CH4/EX4.1/Example4_1.sce17
-rwxr-xr-x191/CH4/EX4.1/Result4_1.txt9
2 files changed, 26 insertions, 0 deletions
diff --git a/191/CH4/EX4.1/Example4_1.sce b/191/CH4/EX4.1/Example4_1.sce
new file mode 100755
index 000000000..79593dae9
--- /dev/null
+++ b/191/CH4/EX4.1/Example4_1.sce
@@ -0,0 +1,17 @@
+//The Power Method of finding largest Eigen value of given matrix
+clear;
+clc;
+close();
+A=[3 0 1;2 2 2;4 2 5]; //Given Matrix
+u0=[1 1 1]'; //Intial vector
+v=A*u0;
+a=max(u0);
+while abs(max(v)-a)>0.05 //for accuracy
+ a=max(v);
+ u0=v/max(v);
+ v=A*u0;
+end
+format('v',4);
+disp(max(v),'Eigen value :')
+format('v',5);
+disp(u0,'Eigen vector :') \ No newline at end of file
diff --git a/191/CH4/EX4.1/Result4_1.txt b/191/CH4/EX4.1/Result4_1.txt
new file mode 100755
index 000000000..6b7b1abed
--- /dev/null
+++ b/191/CH4/EX4.1/Result4_1.txt
@@ -0,0 +1,9 @@
+ Eigen value :
+
+ 7.
+
+ Eigen vector :
+
+ 0.25
+ 0.5
+ 1. \ No newline at end of file