InvMatrix
AnalysisLibErrType InvMatrix (void *inputMatrix, ssize_t matrixSize, void *outputMatrix);
Purpose
Finds the inverse matrix of a square matrix. InvMatrix can perform the operation in place; that is, the input and output matrices can be the same.
If the matrix is singular, InvMatrix returns an error code and does not invert the matrix.
![]() |
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 * | The square matrix to invert. This matrix must be an array of doubles. |
matrixSize | ssize_t | Number of rows and columns of the input matrix. |
Output | ||
Name | Type | Description |
outputMatrix | void * | Inverse matrix, as an array of doubles. |
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: Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later