Navigation

Operators and Keywords

Function List:

C++ API

Function File: condest (A)
Function File: condest (A, t)
Function File: [est, v] = condest (…)
Function File: [est, v] = condest (A, solve, solve_t, t)
Function File: [est, v] = condest (apply, apply_t, solve, solve_t, n, t)

Estimate the 1-norm condition number of a matrix A using t test vectors using a randomized 1-norm estimator.

If t exceeds 5, then only 5 test vectors are used.

If the matrix is not explicit, e.g., when estimating the condition number of A given an LU factorization, condest uses the following functions:

apply

A*x for a matrix x of size n by t.

apply_t

A'*x for a matrix x of size n by t.

solve

A \ b for a matrix b of size n by t.

solve_t

A' \ b for a matrix b of size n by t.

The implicit version requires an explicit dimension n.

condest uses a randomized algorithm to approximate the 1-norms.

condest returns the 1-norm condition estimate est and a vector v satisfying norm (A*v, 1) == norm (A, 1) * norm (v, 1) / est. When est is large, v is an approximate null vector.

References:

See also: cond, norm, onenormest.

Demonstration 1

The following code

 N = 100;
 A = randn (N) + eye (N);
 condest (A)
 [L,U,P] = lu (A);
 condest (A, @(x) U \ (L \ (P*x)), @(x) P'*(L' \ (U'\x)))
 condest (@(x) A*x, @(x) A'*x, @(x) U \ (L \ (P*x)), @(x) P'*(L' \ (U'\x)), N)
 norm (inv (A), 1) * norm (A, 1)

Produces the following output

ans =  979.54
ans =  979.54
ans =  936.81
ans =  979.54

Package: octave