Synopsis

PDX_MSGT mth_MatrixInverse(long option, int dim, double *matrix1, double *matrix2)

Purpose

Find the inverse of a square matrix

Description

The inverse of a square matrix will be computed. The input matrix must be a square one. If it is a singular matrix, an error will be issued.

The array of output matrix could be the same as that of input matrix.

Input

option

Options (not used)

dim

The number of rows/columns in the input matrix

matrix1

The input matrix [dim x dim]

Output

matrix2

The inverse matrix [dim x dim]

Tolerances

      MTH_ZERO_TOL
      .fi

Return

      MTH_NOERR
      MTH_INVALID_RANGE
      MTH_NOMEMORY
      MTH_SINGULAR_MATRIX
      Low level error return
      .fi