Web pdp-10.trailing-edge.com

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0026/simq.doc
There are 2 other files named simq.doc in the archive. Click here to see a list.
```SUBROUTINE SIMQ

PURPOSE
OBTAIN SOLUTION OF A SET OF SIMULTANEOUS LINEAR EQUATIONS,
AX=B

USAGE
CALL SIMQ(A,B,N,KS)

DESCRIPTION OF PARAMETERS
A - MATRIX OF COEFFICIENTS STORED COLUMNWISE.  THESE ARE
DESTROYED IN THE COMPUTATION.  THE SIZE OF MATRIX A IS
N BY N.
B - VECTOR OF ORIGINAL CONSTANTS (LENGTH N). THESE ARE
REPLACED BY FINAL SOLUTION VALUES, VECTOR X.
N - NUMBER OF EQUATIONS AND VARIABLES. N MUST BE .GT. ONE.
KS - OUTPUT DIGIT
0 FOR A NORMAL SOLUTION
1 FOR A SINGULAR SET OF EQUATIONS

REMARKS
MATRIX A MUST BE GENERAL.
IF MATRIX IS SINGULAR , SOLUTION VALUES ARE MEANINGLESS.
AN ALTERNATIVE SOLUTION MAY BE OBTAINED BY USING MATRIX
INVERSION (MINV) AND MATRIX PRODUCT (GMPRD).

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
NONE

METHOD
METHOD OF SOLUTION IS BY ELIMINATION USING LARGEST PIVOTAL
DIVISOR. EACH STAGE OF ELIMINATION CONSISTS OF INTERCHANGING
ROWS WHEN NECESSARY TO AVOID DIVISION BY ZERO OR SMALL
ELEMENTS.
THE FORWARD SOLUTION TO OBTAIN VARIABLE N IS DONE IN
N STAGES. THE BACK SOLUTION FOR THE OTHER VARIABLES IS
CALCULATED BY SUCCESSIVE SUBSTITUTIONS. FINAL SOLUTION
VALUES ARE DEVELOPED IN VECTOR B, WITH VARIABLE 1 IN B(1),
VARIABLE 2 IN B(2),........, VARIABLE N IN B(N).
IF NO PIVOT CAN BE FOUND EXCEEDING A TOLERANCE OF 0.0,
THE MATRIX IS CONSIDERED SINGULAR AND KS IS SET TO 1. THIS
TOLERANCE CAN BE MODIFIED BY REPLACING THE FIRST STATEMENT.

```