cond
Condition number of a matrix.
Syntax
Section titled “Syntax”c = cond(A)c = cond(A, p)Description
Section titled “Description”Returns the matrix condition number: cond(A) = norm(A, p) * norm(inv(A), p). For p = 2 (the default), this is the ratio of the largest to smallest singular value. Large condition numbers indicate A is close to singular and that solving A*x = b will lose numerical precision proportionally.
Examples
Section titled “Examples”cond(eye(5)) % 1 (perfectly conditioned)cond(magic(3)) % ~4.33cond(hilb(5)) % ~4.77e+5 (Hilbert matrix is ill-conditioned)