MatSEqn FUNCTION
MatSEqnS%
MatSEqnD%
MatSEqnC%
Syntax
errcode% = MatSEqntype%(matrix1( ), matrix2( ))
Remarks
The MatSEqntype% procedure solves a system of linear equations contained in
a square matrix; that is, a matrix that has the same number of rows and
columns (n x n). Gaussian elimination is used to solve the equations. The
input matrix contains values whose data type is defined by the last letter
in the procedure name (S, D, or C). The first matrix is the square input
matrix that contains the coefficients for a system of simultaneous
equations. The second matrix, matrix2( ), is the space where the solution is
returned. The solution space is an n x 1 matrix. The solution matrix
contains values of the same data type as the input matrix. Once the
procedure has been performed, the identity matrix is in matrix1( ).
MatSEqntype% uses the following arguments.
matrix1( )
----------
A matrix consisting of n x n dimensions.
matrix2( )
----------
Solution array consisting of 1 x n dimensions.
A result code is returned that indicates the success or failure of the
FUNCTION procedure. Possible result codes are.
0 Normal completion. No error occurred.
- 1 Determinant for matrix is 0. No inverse of the input matrix exists.
- 2 Matrix not square. The matrix does not have the same number of rows as
columns.
- 3 Inside dimension not the same. The number of columns in matrix1 is not
the same as the number of rows in matrix2.