Advanced Analysis Library Only
AnalysisLibErrType GenLinEqs (void *inputArray, int numberOfRows, int numberOfColumns, double rightHandSide[], int matrixType, double outputVector[]);
![]() |
Note This function is obsolete. National Instruments recommends that you use SolveEqs instead. |
Solves for the unknown vector x in the linear system of equations:
Ax = y
where | A is the real input matrix |
y is the known vector on the right side |
The input matrix can be square or rectangular. The number of elements in rightHandSide must equal the number of rows in the matrix inputArray.
GenLinEqs calculates the solution using the Singular Value Decomposition technique.
In the case of non-singular, square matrices, in which no row or column is a linear combination of any other row or column, GenLinEqs solves for the unique solution x.
Two possibilities exist in the case of rectangular matrices. If the number of rows is greater than the number of columns, the system has more equations than unknowns and is an overdetermined system. Because the solution that satisfies the previous equation might not exist, this procedure finds the least square solution x, which minimizes
If the input matrix is rank-deficient, GenLinEqs returns a warning.
The matrixType parameter specifies the type of the input matrix. The input matrix can be an upper or lower triangular matrix, a general matrix, or a positive definite matrix.
Input | ||||||||||||
Name | Type | Description | ||||||||||
inputArray | numeric array | Input matrix. The matrix can be square or rectangular.This matrix must be an array of doubles. | ||||||||||
numberOfRows | integer | Number of rows in inputArray. | ||||||||||
numberOfColumns | integer | Number of columns in inputArray. | ||||||||||
rightHandSide | double-precision array | Complex array that contains the set of known vector coefficients. | ||||||||||
matrixType | integer | 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 | ||||||||||
outputVector | double-precision array | Solution to the linear system of equations. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |