GenDeterminant
Advanced Analysis Library Only
AnalysisLibErrType GenDeterminant (void *inputMatrix, ssize_t matrixSize, int matrixType, double *determinant);
Purpose
Calculates the determinant of the real, square input matrix A. In contrast to Determinant, GenDeterminant allows you to specify the type of matrix type with the matrixType parameter. The input matrix can be upper or lower triangular, general, or positive definite.
For upper or lower triangular matrices, the determinant equals the product of the diagonal elements of the matrix. For a positive definite matrix, GenDeterminant first calculates the Cholesky factorization of the input matrix and then calculates the determinant as the square of the determinant of the upper triangular matrix R.
Parameters
Input | ||||||||||||
Name | Type | Description | ||||||||||
inputMatrix | void * | Input square matrix. This matrix must be an array of doubles. | ||||||||||
matrixSize | ssize_t | Number of elements in one dimension of the input matrix. | ||||||||||
matrixType | int | Type of the matrix. Choose the matrix type correctly because it significantly affects the speed of computation. The following table shows valid matrix type values.
|
||||||||||
Output | ||||||||||||
Name | Type | Description | ||||||||||
determinant | double | Determinant of the input matrix. |
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