Admin Production ni-theme
Current Publication

CxCheckPosDef

LabWindows/CVI

CxCheckPosDef

Advanced Analysis Library Only

AnalysisLibErrType CxCheckPosDef (void *inputMatrix, ssize_t matrixSize, int *positiveDefinite);

Purpose

Checks if the complex, square input matrix is positive definite. A complex, square matrix is positive definite if and only if it is symmetric and the quadratic form

xHAx > 0

is true for all nonzero vectors x. For more information about positive definite matrices, refer to Matrix Computations by G.H. Golub and C.F. VanLoan, cited in the Bibliography.

Parameters

Input
Name Type Description
inputMatrix void * Contains the input matrix that is to be tested for positive definiteness. This matrix must be an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

matrixSize ssize_t Number of elements in one dimension of the matrix.
Output
Name Type Description
positiveDefinite int indicates if inputMatrix is symmetric and positive definite.
1 if the input matrix is positive definite; 0 otherwise.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later