I am trying to determine eigenvalues for an nxn matrix where n2
For a 3x3 matrix, this might be slightly better to calculate the 3 variables
in the cubic equation.
You then solve the cubic equation to get your 3 Eigenvalues.
I'm not exactly sure how it's done for larger systems.
Sub Demo()
Dim m
Dim b, c, d
Dim j, p, n
'// Load array from A1:C3
m = [A1:C3]
'//=======================================
'// Characteristic Polynomial =
'// x^3 + b*x^2 + c*x + d = 0
'//=======================================
For j = 1 To 3
b = b - m(j, j) 'Trace
p = 163 Mod (j + 4)
n = 11 Mod (j + 2)
'Minors
c = c + m(p, p) * m(n, n) - m(p, n) * m(n, p)
Next j
d = -WorksheetFunction.MDeterm(m)
Debug.Print b; c; d
End Sub
--
HTH. :)
Dana DeLouis
Windows XP, Office 2003
<snip
|