Advanced Analysis Library Only
AnalysisLibErrType SymEigenValueVector (void *inputMatrix, int matrixSize, int outputChoice, double eigenValues[], void *eigenVectors);
Calculates the eigenvalues λ and the corresponding eigenvectors x of a real, symmetric square input matrix A. The following formula defines the eigenvalues and the corresponding eigenvectors:
Ax = λx
The eigenvalues and the eigenvectors are all real-valued.
The outputChoice parameter determines what to calculate. Depending on your application, you can choose to calculate just the eigenvalues or to calculate both the eigenvalues and the eigenvectors.
The eigenValues output parameter is a 1D, real array of matrixSize elements.
The eigenVectors output parameter is a matrixSize-by-matrixSize real matrix (2D array). Each column of this matrix is the eigenvector that corresponds to the
component of the eigenValues. Each eigenvector is normalized so that its largest component equals one.
Input | ||
Name | Type | Description |
inputMatrix | numeric array | Input symmetric square matrix. This matrix must be an array of doubles. |
matrixSize | integer | Number of elements in one dimension of the input matrix. |
outputChoice | integer | Pass 0 for eigenvalues only; 1 for both eigenvalues and eigenvectors. |
Output | ||
Name | Type | Description |
eigenValues | double-precision array | Resulting eigenvalues of the input matrix. |
eigenVectors | numeric array | Resulting eigenvectors of the input matrix, as an array of doubles. If outputChoice is eigenvalues only, you can pass NULL for this parameter. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |