CxGenInvMatrix
Advanced Analysis Library Only
AnalysisLibErrType CxGenInvMatrix (void *inputMatrix, ssize_t matrixSize, int matrixMatrixType, void *matrixInverse);
Purpose
Calculates the inverse of a complex, square input matrix. If B denotes the inverse of the matrix A, then
AB = I
where I is the identity matrix.
The input matrix can be an upper or lower triangular matrix, a general, square matrix, or a positive definite matrix. You can save significant computation time if you properly specify the input matrix type.
![]() |
Note If you use this function on an ill-conditioned matrix, the result may be inaccurate due to a loss of precision from arithmetic calculations. The results could also vary between machines because National Instruments uses different optimizations based on processor type. |
Parameters
Input | ||||||||||||
Name | Type | Description | ||||||||||
inputMatrix | void * | Input complex, square matrix. 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. | ||||||||||
matrixMatrixType | int | Type of the input 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 | ||||||||||
matrixInverse | void * | Result complex inverse matrix, as an array of <span class"Monospace">ComplexNum. 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