summaryrefslogtreecommitdiff
path: root/3293/CH5/EX5.6/Ex5_6.sce
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.6/Ex5_6.sce
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.6/Ex5_6.sce')
-rwxr-xr-x3293/CH5/EX5.6/Ex5_6.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/3293/CH5/EX5.6/Ex5_6.sce b/3293/CH5/EX5.6/Ex5_6.sce
new file mode 100755
index 000000000..59dcb9a74
--- /dev/null
+++ b/3293/CH5/EX5.6/Ex5_6.sce
@@ -0,0 +1,29 @@
+//page 158
+//Example 5.6
+clc;
+clear;
+close;
+disp('Given Matrix:');
+A = [1 -1 2 3; 2 2 0 2; 4 1 -1 -1;1 2 3 0];
+disp(A,'A = ');
+disp('After, Subtracting muliples of row 1 from rows 2 3 4');
+disp('R2 = R2 - 2*R1');
+A(2,:) = A(2,:) - 2 * A(1,:);
+disp('R3 = R3 - 4*R1');
+A(3,:) = A(3,:) - 4 * A(1,:);
+disp('R4 = R4 - R1');
+A(4,:) = A(4,:) - A(1,:);
+disp(A,'A = ');
+T = A; //Temporary matrix to store A
+disp('We obtain the same determinant as before.');
+disp('Now, applying some more row transformations as:');
+disp('R3 = R3 - 5/4 * R2');
+T(3,:) = T(3,:) - 5/4 * T(2,:);
+disp('R4 = R4 - 3/4 * R2');
+T(4,:) = T(4,:) - 3/4 * T(2,:);
+B = T;
+disp('We get B as:');
+disp(B,'B = ');
+disp('Now,determinant of A and B will be same');
+disp(det(B),'det A = det B = ');
+//end