COND

The COND function returns the condition number of an n by n real or complex array A by explicitly computing NORM(A)·NORM(A -1 ). If A is real and A -1 is invalid (due to the singularity of A or floating-point errors in the INVERT function), COND returns -1. If A is complex and A -1 is invalid (due to the singularity of A ), calling COND results in floating-point errors.

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.

Calling Sequence

Result = COND( A )

Arguments

A

An n by n real or complex array.

Keywords

DOUBLE

Set this keyword to force the computation to be done in double-precision arithmetic.

Example

Define a complex array A:

A = [[COMPLEX(1, 0), COMPLEX(2,-2), COMPLEX(-3, 1)], $

     [COMPLEX(1,-2), COMPLEX(2, 2), COMPLEX(1, 0)], $

     [COMPLEX(1, 1), COMPLEX(0, 1), COMPLEX(1, 5)]]

Compute the condition number of the array using internal double-precision arithmetic.

PRINT, COND(A, /DOUBLE)

IDL prints:

5.93773

See Also

DETERM , INVERT