Admin Production ni-theme
Current Publication

CxDeterminant

LabWindows/CVI

CxDeterminant

Advanced Analysis Library Only

AnalysisLibErrType CxDeterminant (void *inputMatrix, ssize_t matrixSize, int matrixType, NIComplexNumber *determinant);

Purpose

Calculates the complex determinant of a square, complex input matrix.

In this function you can specify the input matrix type using matrixType. The input matrix can be upper or lower triangular, general, or positive definite. For an upper or lower triangular matrix, the determinant equals the product of the diagonal elements of the matrix. For a positive definite matrix, CxDeterminant first calculates the Cholesky factorization of the input matrix and then calculates the determinant as the square of the determinant of R.

Parameters

Input
Name Type Description
inputMatrix void * Input complex, square matrix.

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 input matrix.
matrixType int Type of the input matrix. Choose the matrix type correctly because it significantly affects the speed of computation.

Matrix Type Value
General matrix 0
Positive definite 1
Lower triangular 2
Upper triangular 3
Output
Name Type Description
determinant NIComplexNumber Complex determinant of the input matrix.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

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