summaryrefslogtreecommitdiff
path: root/1052/CH31/EX31.1/311.sce
diff options
context:
space:
mode:
Diffstat (limited to '1052/CH31/EX31.1/311.sce')
-rwxr-xr-x1052/CH31/EX31.1/311.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/1052/CH31/EX31.1/311.sce b/1052/CH31/EX31.1/311.sce
new file mode 100755
index 000000000..0d7bde4e4
--- /dev/null
+++ b/1052/CH31/EX31.1/311.sce
@@ -0,0 +1,12 @@
+clc;
+//Example 31.1 page no 486
+printf("Example 31.1 page no 486\n\n ");
+//set of linear algebric equation using gauss elimination
+A=[3,-2,1;1,4,-2;2,-3,-4]//matrix A
+B=[7;21;9]//matrix B
+X=inv(A)*B
+printf("\n X=%f",X);
+X1=X(1,1)//value of X1
+X2=X(2,1)//value of X2
+X3=X(3,1)//value of X3
+printf("\n X1=%f\nX2=%f \nX3=%f",X1,X2,X3);