MFsym_eigenvalues MDsym_eigenvalues MEsym_eigenvalues
FunctionEigenvalues and/or Eigenvectors of a real symmetric matrix
Syntax C/C++#include <MFstd.h>
int MFsym_eigenvalues( fVector EigVals, fMatrix EigVecs, fMatrix MA, ui len, int CalcEigenVec );
C++ MatObj#include <OptiVec.h>
int matrix<T>::sym_eigenvalues( matrix<T> EigVecs, const matrix<T>& MA, int CalcEigenVec );
int matrix<T>::sym_eigenvalues( matrix<T>* EigVecs, const matrix<T>& MA, int CalcEigenVec );
Pascal/Delphiuses MFstd;
function MFsym_eigenvalues( EigVals:fVector; EigVecs, MA:fMatrix; len:UIntSize; CalcEigenVec:IntBool ): IntBool;
DescriptionThe eigenvalues, with or without the eigenvectors, of MA are calculated. This function is for non-singular symmetric real matrices only! It takes the following arguments:
  • EigVals: a vector in which the eigenvalues will be returned
  • EigVecs: a matrix whose columns will be filled with the eigenvectors
  • MA: the input matrix, which may or may not be overwritten by EigVecs
  • len: the length of the rows (which is the same as the height of the columns, as MA must be a symmetric square matrix)
  • CalcEigenVec: an int or IntBool, deciding if only the eigenvalues are needed (CalcEigenVec = FALSE or 0), or if the eigenvectors are desired as well (CalcEigenVec = TRUE or 1). Calculating the eigenvalues alone, without the eigenvectors, can speed up the calculation by up to a factor of two.
Return valueFALSE (0), if no error occurred, otherwise TRUE (non-zero).
See alsochapter 10,   chapter 11

MatrixLib Table of Contents  OptiVec home