summaryrefslogtreecommitdiff
path: root/964/CH9/EX9.4/9_4.sce
blob: 49c3507c86b27e8b5be89e2588532fc07107eabd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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=")