Estimates the condition number of a matrix.
COND(a, p)
a |
- |
The input matrix. |
p |
- |
Optional. An integer, the p-norm. Defaults to 2, singular value method. |
A real, the estimated condition number.
W1: {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}}
W2: {{1, 2, 3},
{4, 5, 6},
{7, 8, 0}}
cond(W1) == 8.579581E+016
cond(W2) == 35.105870
By default, COND uses SVD to compute the singular values of a matrix. The result is the ratio of the maximum and minimum singular values.
If p is specified, the condition number is computed as:
c = norm(a, p) * norm(inv(a), p)
The condition number is infinite for a singular matrix, thus a large condition number indicates an ill conditioned matrix.
See RCOND to estimate of the reciprocal condition number.