summaryrefslogtreecommitdiff
path: root/26/CH3/EX3.2.7/3_2_7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /26/CH3/EX3.2.7/3_2_7.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 '26/CH3/EX3.2.7/3_2_7.sce')
-rwxr-xr-x26/CH3/EX3.2.7/3_2_7.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/26/CH3/EX3.2.7/3_2_7.sce b/26/CH3/EX3.2.7/3_2_7.sce
new file mode 100755
index 000000000..08150668d
--- /dev/null
+++ b/26/CH3/EX3.2.7/3_2_7.sce
@@ -0,0 +1,15 @@
+disp('the given matrix is:')
+A=[1 3 0 2;-2 -5 7 4;3 5 2 1;1 -1 2 -3]
+disp(A,'A=')
+disp('performing row operations')
+A(2,:)=A(2,:)-(A(2,1)/A(1,1))*A(1,:)
+A(3,:)=A(3,:)-(A(3,1)/A(1,1))*A(1,:)
+A(4,:)=A(4,:)-(A(4,1)/A(1,1))*A(1,:)
+disp(A)
+A(3,:)=A(3,:)-(A(3,2)/A(2,2))*A(2,:)
+A(4,:)=A(4,:)-(A(4,2)/A(2,2))*A(2,:)
+disp(A)
+A(4,:)=A(4,:)-(A(4,3)/A(3,3))*A(3,:)
+disp(A)
+disp('det(A) is the product of diagonal entries')
+disp(det(A),'det(A)=') \ No newline at end of file