## functions in matrix.i - L

LUrcond

LUrcond(a) or LUrcond(a, one_norm=1) returns the reciprocal condition number of the N-by-N matrix A. If the ONE_NORM argument is non-nil and non-zero, the 1-norm condition number is returned, otherwise the infinity-norm condition number is returned. The condition number is the ratio of the largest to the smallest singular value, max(singular_values)*max(1/singular_values) (or sum(abs(singular_values)*sum(abs(1/singular_values)) if ONE_NORM is selected?). If the reciprocal condition number is near zero then A is numerically singular; specifically, if 1.0+LUrcond(a) == 1.0 then A is numerically singular. Interpreted function, defined at i0/matrix.i line 225SEE ALSO: LUsolve

LUsolve

LUsolve(a, b) or LUsolve(a, b, which=which) or a_inverse= LUsolve(a) returns the solution x of the matrix equation: A(,+)*x(+) = B If A is an n-by-n matrix then B must have length n, and the returned x will also have length n. B may have additional dimensions, in which case the returned x will have the same additional dimensions. The WHICH dimension of B, and of the returned x is the one of length n which participates in the matrix solve. By default, WHICH=1, so that the equations being solved are: A(,+)*x(+,..) = B Non-positive WHICH counts from the final dimension (as for the sort and transpose functions), so that WHICH=0 solves: x(..,+)*A(,+) = B Other examples: A_ij X_jklm = B_iklm (WHICH=1) A_ij X_kjlm = B_kilm (WHICH=2) A_ij X_klmj = B_klmi (WHICH=4 or WHICH=0) If the B argument is omitted, the inverse of A is returned: A(,+)*x(+,) and A(,+)*x(,+) will be unit matrices. LUsolve works by LU decomposition using Gaussian elimination with pivoting. It is the fastest way to solve square matrices. QRsolve handles non-square matrices, as does SVsolve. SVsolve is slowest, but can deal with highly singular matrices sensibly. Interpreted function, defined at i0/matrix.i line 106SEE ALSO: QRsolve, TDsolve, SVsolve, SVdec, LUrcond