summaryrefslogtreecommitdiff
path: root/3293/CH5/EX5.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3293/CH5/EX5.5
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 '3293/CH5/EX5.5')
-rwxr-xr-x3293/CH5/EX5.5/Ex5_5.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/3293/CH5/EX5.5/Ex5_5.sce b/3293/CH5/EX5.5/Ex5_5.sce
new file mode 100755
index 000000000..f2238a7fa
--- /dev/null
+++ b/3293/CH5/EX5.5/Ex5_5.sce
@@ -0,0 +1,28 @@
+//page 147
+//Example 5.5
+clc;
+clear;
+close;
+function [E1 , E2 , E3] = determinant(A)
+ E1 = A(1,1)*det([A(2,2) A(2,3);A(3,2) A(3,3)]) - A(2,1)*det([A(1,2) A(1,3);A(3,2) A(3,3)]) + A(3,1)*det([A(1,2) A(1,3);A(2,2) A(2,3)]);
+ E2 = -A(1,2)*det([A(2,1) A(2,3);A(3,1) A(3,3)]) + A(2,2)*det([A(1,1) A(1,3);A(3,1) A(3,3)]) + A(3,2)*det([A(1,1) A(1,3);A(2,1) A(2,3)]);
+ E3 = A(1,3)*det([A(2,1) A(2,2);A(3,1) A(3,2)]) - A(2,3)*det([A(1,1) A(1,2);A(3,1) A(3,2)]) + A(3,3)*det([A(1,1) A(1,2);A(2,1) A(2,2)]);
+endfunction
+
+//part a
+x = poly(0,"x");
+A = [x-1 x^2 x^3;0 x-2 1;0 0 x-3];
+disp(A,'A = ');
+[E1, E2, E3] = determinant(A);
+disp(E1,'E1(A) = ');
+disp(E2,'E2(A) = ');
+disp(E3,'E3(A) = ');
+disp('--------------------------------------');
+//part b
+A = [0 1 0;0 0 1;1 0 0];
+disp(A,'A = ');
+[E1, E2, E3] = determinant(A);
+disp(E1,'E1(A) = ');
+disp(E2,'E2(A) = ');
+disp(E3,'E3(A) = ');
+//end