summaryrefslogtreecommitdiff
path: root/191/CH4/EX4.7
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.7
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.7')
-rwxr-xr-x191/CH4/EX4.7/Example4_7.sce41
-rwxr-xr-x191/CH4/EX4.7/Result4_7.txt29
2 files changed, 70 insertions, 0 deletions
diff --git a/191/CH4/EX4.7/Example4_7.sce b/191/CH4/EX4.7/Example4_7.sce
new file mode 100755
index 000000000..8660d1e04
--- /dev/null
+++ b/191/CH4/EX4.7/Example4_7.sce
@@ -0,0 +1,41 @@
+//Sturm sequence property
+clc;
+clear;
+close();
+C=[2,4,0,0;4,10,3,0;0,3,9,-1;0,0,-1,5];
+//find the eigen vClues lying (0,5)
+p=0;
+
+f(1)=1;
+f(2)=C(1,1)-p;
+count = 0;
+if f(1)*f(2)>=0 then
+ count = 1;
+end
+for r=3:5
+ br=C(r-2,r-1);
+ f(r)=-br^2*f(r-2)+(C(r-1,r-1)-p)*f(r-1);
+ if f(r)*f(r-1)>=0 then
+ count = count+1;
+ end
+end
+disp(f,'Sturm sequences')
+disp(count,'Number of eigen values strickly greater than 0 : ')
+
+p=5;
+f(1)=1;
+f(2)=C(1,1)-p;
+count1 = 0;
+if f(1)*f(2)>=0 then
+ count1 = 1;
+end
+for r=3:5
+ br=C(r-2,r-1);
+ f(r)=-br^2*f(r-2)+(C(r-1,r-1)-p)*f(r-1);
+ if f(r)*f(r-1)>=0 then
+ count1 = count1+1;
+ end
+end
+disp(f,'Sturm sequences')
+disp(count1,'Number of eigen values strickly greater than 5 : ')
+disp(count-count1,'Number of eigen values between 0 and 5 : ')
diff --git a/191/CH4/EX4.7/Result4_7.txt b/191/CH4/EX4.7/Result4_7.txt
new file mode 100755
index 000000000..f5ca44bde
--- /dev/null
+++ b/191/CH4/EX4.7/Result4_7.txt
@@ -0,0 +1,29 @@
+
+ Sturm sequences
+
+ 1.
+ 2.
+ 4.
+ 18.
+ 86.
+
+ Number of eigen values strickly greater than 0 :
+
+ 4.
+
+ Sturm sequences
+
+ 1.
+ - 3.
+ - 31.
+ - 97.
+ 31.
+
+ Number of eigen values strickly greater than 5 :
+
+ 2.
+
+ Number of eigen values between 0 and 5 :
+
+ 2.
+ \ No newline at end of file