Eigen and EigenC methods are used to calculate matrix Eigenvalues and Eigenvectors. Their difference is that while Eigen method uses 4 Matrix objects as output parameters, EigenC method uses 2 CMatrix objects.
'Declare a Matrix Dim A As Matrix Set A = New Matrix A.Size 4, 4 A.FillRandom 'Using Eigen method for Eigenvalues Eigenvectors Dim rVal As Matrix, iVal As Matrix Dim rVec As Matrix, IVec As Matrix Set rVal = New Matrix Set iVal = New Matrix Set rVec = New Matrix Set IVec = New Matrix A.Eigen rVal, iVal, rVec, IVec 'Using EigenC method Dim Val As CMatrix, Vec As CMatrix Set Val = New CMatrix Set Vec = New CMatrix A.EigenC Val, Vec
With CMatrix objects only EigenC method can be used.
If only Eigenvalues are needed, then matrix parameters used for Eigenvectors can be omitted. In such a case Eigenvectors won't be calculated at all and method execution will be faster.
A.Eigen rVal, iVal
or
A.EigenC Val
Referencing ShortName 3.1 | Declaring Matrices | Matrix Properties and Methods | Matrices and Arrays | Basic Matrix Operations | Matrix Decompositions