diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1670/CH4/EX4.16/4_16.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1670/CH4/EX4.16/4_16.sce')
-rwxr-xr-x | 1670/CH4/EX4.16/4_16.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/1670/CH4/EX4.16/4_16.sce b/1670/CH4/EX4.16/4_16.sce new file mode 100755 index 000000000..a507e0337 --- /dev/null +++ b/1670/CH4/EX4.16/4_16.sce @@ -0,0 +1,25 @@ +//Example 4.16
+//Strum Sequence
+//Page no. 117
+clc;clear;close;
+
+A=[8,-6,2;-6,7,-4;2,-4,3]
+disp(A,'A=')
+k=0;
+for j=2:3
+ k=k+A(j,1)^2;
+end
+a=A(2,1)*abs(1/A(2,1))*sqrt(k);
+U=[0;a+A(2,1);A(3,1)];
+U1=U'*U;
+U2=U*U';
+P=eye(3,3)-(2*U2)/U1;
+B=P*A*P;
+disp(B,'Reduced Matrix = ');
+lb=poly(0,"lb")
+f0l=1; //strum sequence
+f1l=(B(1,1)-lb)*f0l;
+f2l=(B(2,2)-lb)*f1l-B(1,2)^2*f0l
+f3l=(B(3,3)-lb)*f2l-B(2,3)^2*f1l
+disp(f3l,"f3(lambda) = ")
+disp(roots(f3l),"Therefore the eigenvalues are : ")
\ No newline at end of file |