Skip to main content

MatrixLinearSolve

MatrixLinearSolve [/D={subDiagonals,superDiagonals }/M=method /O/Z] [/L][/U] matrixA matrixB

The MatrixLinearSolve operation solves the linear system matrixA *X=matrixB where matrixA is an N-by-N matrix and matrixB is an N-by-NRHS matrix of the same data type.

Flags

/M=methodDetermine the solution method which best suites input matrixA.
method =1:Uses simple LU decomposition (default). See also LAPACK documentation for SGESV, CGESV, DGESV, and ZGESV.
Creates the wave W_IPIV that contains the pivot indices that define the permutation matrix P. Row (i) if the matrix was interchanged with row ipiv(i).
method =2:If matrixA is band diagonal, you also have to specify /D. See also LAPACK documentation for SGBSV, CGBSV, DGBSV, and ZGBSV.
Creates the wave W_IPIV that contains the pivot indices that define the permutation matrix P. Row (i) if the matrix was interchanged with row ipiv(i). Also note that if you are using the /O flag, the overwritten waves may have a different dimensions.
method =4:For tridiagonal matrix; still expecting full matrix in matrixA, but it will ignore the data in the elements outside the 3 diagonals. See also LAPACK documentation for SGTSV, CGTSV, DGTSV, and ZGTSV.
method =8:Symmetric/hermitian. See also LAPACK documentation for SPOSV, CPOSV, DPOSV, and ZPOSV.
method =16:Complex symmetric (complex only). See also LAPACK documentation for CSYSV and ZSYSV.
/D={sub,super}Specifies a band diagonal matrix. The subdiagonal (sub) and superdiagonal (super) size must be positive integers.
/LUses the lower triangle of matrixA. /L and /U are mutually exclusive flags.
/UUses the upper triangle of matrixA. /U is the default.
/OOverwrites matrixA and matrixB with the results of the operation. This will save on the amount of memory needed.
/ZNo error reporting.

Details

If /O is not specified, the operation also creates the n-by-n wave M_A and the n-by-nrhs solution wave M_B.

The variable V_flag is created by the operation. If the operation completes successfully, V_flag is set to zero, otherwise it is set to the LAPACK error code.

See Also

Matrix Math Operations for more about Igor's matrix routines and for background references with details about the LAPACK libraries.