XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Dgecon()

Sub Dgecon ( Norm As  String,
N As  Long,
A() As  Double,
ANorm As  Double,
RCond As  Double,
Info As  Long 
)

Condition number of a general matrix

Purpose
This routine estimates the reciprocal of the condition number of a general real matrix A, in either the 1-norm or the infinity-norm, using the LU factorization computed by Dgetrf, Dgesv or Dgesvx.

An estimate is obtained for norm(inv(A)), and the reciprocal of the condition number is computed as
RCond = 1 / (norm(A) * norm(inv(A))).
Parameters
[in]NormSpecifies whether the 1-norm condition number or the infinity-norm condition number is required.
= "1" or "O": 1-norm
= "I": Infinity-norm
[in]NOrder of the matrix A. (N >= 0) (If N = 0, returns RCond = 1)
[in]A()Array A(LA1 - 1, LA2 - 1) (LA1 >= N, LA2 >= N)
Factors L and U from the factorization A = P*L*U as computed by Dgetrf, Dgesv or Dgesvx.
[in]ANormNorm = "1" or "O": The 1-norm of the original matrix A (ANorm >= 0)
Norm = "I": The infinity-norm of the original matrix A (ANorm >= 0)
[out]RCondThe reciprocal of the condition number of the matrix A, computed as RCond = 1/(norm(A) * norm(inv(A))).
[out]Info= 0: Successful exit.
= -1: The argument Norm had an illegal value. (Norm <> "1", "O" nor "I")
= -2: The argument N had an illegal value. (N < 0)
= -3: The argument A() is invalid.
= -4: The argument ANorm had an illegal value. (ANorm < 0)
Reference
LAPACK
Example Program
See example of Dgesv.