diff options
Diffstat (limited to '964/CH9/EX9.4')
-rwxr-xr-x | 964/CH9/EX9.4/9_4.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/964/CH9/EX9.4/9_4.sce b/964/CH9/EX9.4/9_4.sce new file mode 100755 index 000000000..49c3507c8 --- /dev/null +++ b/964/CH9/EX9.4/9_4.sce @@ -0,0 +1,15 @@ +clc;
+clear;
+//the equations are:
+//3*x1+2*x2=18
+//-x1+2*x2=2
+a11=3;
+a12=2;
+b1=18;
+a21=-1;
+a22=2;
+b2=2;
+x1=(b1*a22-a12*b2)/(a11*a22-a12*a21);
+x2=(b2*a11-a21*b1)/(a11*a22-a12*a21);
+disp(x1,"x1=")
+disp(x2,"x2=")
\ No newline at end of file |