diff options
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 |