diff options
Diffstat (limited to '260/CH5/EX5.3/5_3.sce')
-rw-r--r-- | 260/CH5/EX5.3/5_3.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/260/CH5/EX5.3/5_3.sce b/260/CH5/EX5.3/5_3.sce new file mode 100644 index 000000000..93d21cf8c --- /dev/null +++ b/260/CH5/EX5.3/5_3.sce @@ -0,0 +1,33 @@ +//Eg-5.3
+//pg-217
+
+clear
+clc
+
+A=[5 3;3 5];
+
+[v,d]=spec(A);
+
+//Eigen equation and values
+printf('the eigen equation is(l-%f)(l-%f)=0',d(1),d(2));
+disp("eigen values")
+disp(d)
+
+//eigen vectors
+//corresponding to d(1)
+g=v(1:2,1);
+h=v(1:2,2);
+disp("eigen vectors")
+disp(g)
+disp(h)
+
+//checking orthogonality
+if g'*h==0 then
+ disp("the given eigen vectors are orthogonal")
+end
+
+//checking orthonormality
+
+if round(g'*g)==1& round(h'*h)==1 then
+ disp("the given eigen vectors are orthonormal")
+end
\ No newline at end of file |