>>
TJP> I need a program to solve this set of equations:
TJP> a11*x1 + a12*x2 + a13*x3 + - - - - - - -+ a1n*xn = b1
TJP> a21*x1 + a22*x2 + a23*x3 + - - - - - - -+ a3n*xn = b2
TJP> a31*x1 + a32*x2 + a33*x3 + - - - - - - -+ a3n*xn = b3
TJP> - - - - - - - - -
TJP> - - - - - - - - -
TJP> - - - - - - - - -
TJP> am1*x1 + am2*x2 + am3*x3 + - - - - - - - -+ amn*xn = bn
TJP> A(matrice) X x(vector) = b(vector)
TJP> There are 3 possible solutions:
TJP> 1) x = k (one solution)
TJP> 2) x = k + t*a1 + s*a2 + r*a3 (many solutions)
TJP> 3) x = (no solution)
From what I understand of your problem, all you have to do is:
given: matrix A and result vector B
find: vector X
If that is the case, then do what the other guy says to do. =>
btw: here are some more difficult ways of doing it.
1- Find the inverse of matrix A and then multiply A^(-1) {that is
the inverse of A} with B.
ie: A^(-1) X B = x
2- Use Cramer's Rule to set up this equation:
xn = det (A*) / det(A), where A* is the matrix A with row An replaced
with the vector B as a row. I think this one will work. I'm just not
sure if it should be a column or row, but I'm almost sure it is a row that
is needed.
... Kent Conrad wants to nuke CND because CND won't buy diseased US wheat
--- Blue Wave/DOS v2.30
---------------
* Origin: Juxtaposition BBS. Lasalle, Quebec, Canada (1:167/133)
|