NAG Toolbox: nag_matop_complex_gen_matrix_cond_num (f01kb)

Purpose

nag_matop_complex_gen_matrix_cond_num (f01kb) computes an estimate of the absolute condition number of a matrix function ff at a complex nn by nn matrix AA in the 11-norm. Numerical differentiation is used to evaluate the derivatives of ff when they are required.

Description

The absolute condition number of ff at AA, condabs(f,A)condabs(f,A) is given by the norm of the Fréchet derivative of ff, L(A,E)L(A,E), which is defined by

‖L(X)‖ := maxE ≠ 0(‖L(X,E)‖)/(‖E‖).

‖L(X)‖:=maxE≠0‖L(X,E)‖‖E‖.

The Fréchet derivative in the direction EE, L(X,E)L(X,E) is linear in EE and can therefore be written as

vec(L(X,E)) = K(X)vec(E),

vec(L(X,E))=K(X)vec(E),

where the vecvec operator stacks the columns of a matrix into one vector, so that K(X)K(X) is n2 × n2n2×n2. nag_matop_complex_gen_matrix_cond_num (f01kb) computes an estimate γγ such that γ ≤ ‖K(X)‖1γ≤‖K(X)‖1, where ‖K(X)‖1 ∈ [n − 1‖L(X)‖1,n‖L(X)‖1]‖K(X)‖1∈[n-1‖L(X)‖1,n‖L(X)‖1]. The relative condition number can then be computed via

condrel(f,A) = (condabs(f,A)‖A‖1)/(‖f(A)‖1).

condrel(f,A)=condabs(f,A)‖A‖1‖f(A)‖1.

The algorithm used to find γγ is detailed in Section 3.4 of Higham (2008).

The function ff is supplied via function f which evaluates f(zi)f(zi) at a number of points zizi.

The nznz points z1,z2, … ,znzz1,z2,…,znz at which the function ff is to be evaluated.

4:
user – Any MATLAB object

f is called from nag_matop_complex_gen_matrix_cond_num (f01kb) with the object supplied to nag_matop_complex_gen_matrix_cond_num (f01kb).

Output Parameters

1:
iflag – int64int32nag_int scalar

iflag should either be unchanged from its entry value of zero, or may be set nonzero to indicate that there is a problem in evaluating the function f(z)f(z); for instance f(z)f(z) may not be defined. If iflag is returned as nonzero then nag_matop_complex_gen_matrix_cond_num (f01kb) will terminate the computation, with ifail = 3ifail=3.

Optional Input Parameters

user is not used by nag_matop_complex_gen_matrix_cond_num (f01kb), but is passed to
f. Note that for large objects it may be more efficient to use a global variable which is accessible from the m-files than to use user.