Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
cond
condition number
Syntax
c = cond(X) c = cond(X, p)
Arguments
- X
real or complex matrix. If c = cond(X, p), X must be real or complex square matrix.
- p
scalar or string (type of norm) (default value = 2).
- c
real scalar, the condition number.
Description
- c = cond(X)
returns condition number in 2-norm.
cond(X)
is the ratio of the largest singular value ofX
to the smallest.- c = cond(X, p)
returns condition number in p-norm :
norm(X, p) * norm(inv(X), p)
. Ifp
is specified,p
can be equal to :p = 1.
cond(X, p)
returns condition number in 1-norm.p = 2.
cond(X, p)
returns condition number in 2-norm.p = %inf or 'inf'.
cond(X, p)
returns condition number in infinity norm.p = 'fro'.
cond(X, p)
returns condition number in Frobenius norm.
Examples
A=testmatrix('hilb',6); // condition number in 2-norm cond(A) cond(A, 2) // condition number in 1-norm cond(A, 1) // condition number in infinity norm cond(A, %inf) // condition number in Frobenius norm cond(A, 'fro')
History
Version | Description |
5.4.0 | Calling X = [1 0; 1 -1; 0 1]; cond(X) Calling X = [1 -6 0; 1 0 -4;1 0 2]; cond(X, 1) // condition number in 1-norm (p = 1) |
Report an issue | ||
<< Matrix Analysis | Matrix Analysis | det >> |