summaryrefslogtreecommitdiff
path: root/50/CH3/EX3.27/ex_3_27.sce
diff options
context:
space:
mode:
Diffstat (limited to '50/CH3/EX3.27/ex_3_27.sce')
-rwxr-xr-x50/CH3/EX3.27/ex_3_27.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/50/CH3/EX3.27/ex_3_27.sce b/50/CH3/EX3.27/ex_3_27.sce
new file mode 100755
index 000000000..242a16db7
--- /dev/null
+++ b/50/CH3/EX3.27/ex_3_27.sce
@@ -0,0 +1,24 @@
+// example 3.27
+// a) find eigenvalue and eigen vector;
+// b) verify inv(S)*A*S is a diagonal matrix;
+
+// 1)
+A=[1 2 -2 ;1 1 1;1 3 -1];
+
+B=[1 0 0;0 1 0; 0 0 1];
+
+ [x,lam] = geigenvectors(A,B);
+
+ inv(x)*A*x
+
+ // 2)
+A=[3 2 2;2 5 2;2 2 3];
+
+B=[1 0 0;0 1 0; 0 0 1];
+
+
+ [x,lam] = geigenvectors(A,B);
+
+ inv(x)*A*x
+
+ \ No newline at end of file