COND
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The COND function returns the condition number of a real or complex two-dimensional array A.
By default, COND uses the L∞ norm to compute the condition number. You may use the LNORM keyword to specify the L1, L2, or L∞ norm.
For the L1 and L∞ norms, the condition number is computed from NORM(A)ŪNORM(INVERT(A)). If the inverse of A is invalid (due to the singularity of A or floating-point errors in the INVERT function), COND returns -1.
For the L2 norm, the condition number is defined as the ratio of the largest singular value to the smallest. The singular values are computed using LA_SVD.
This routine is written in the IDL language. Its source code can be found in the file cond.pro in the lib subdirectory of the IDL distribution.
Syntax
Result = COND( A [, /DOUBLE] [, LNORM={0 | 1 | 2}])
Return Value
Returns the condition number of an n by n real or complex array A by explicitly computing NORM(A)ŪNORM(A-1). If A-1 is invalid (due to the singularity of A or floating-point errors in the INVERT function), COND returns -1.
Arguments
A
The two-dimensional array. For LNORM = 0 or 1, the array A must be a square and can be either real or complex. For LNORM = 2, the array A may be rectangular and can only be real.
Keywords
DOUBLE
Set this keyword to force the result to be returned as double-precision. The default is to return a single-precision result if the input is single precision, or a double-precision result otherwise. Internally, IDL performs all computations using double-precision arithmetic.
LNORM
Set this keyword to an integer value to indicate which norm to use for the computation. The possible values of this keyword are:
Examples
IDL prints:
Version History