Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mark
 
Posts: n/a
Default I am trying to determine eigenvalues for an nxn matrix where n2

basically I am trying to determine the math steps for determining the
eigenvalues for a nxn matrix where n= either 3 or 4.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default I am trying to determine eigenvalues for an nxn matrix where n2

Eigenvalues for a n x n matrix where n= either 3 or 4.

If you don't get a better response to a 3 by 3 matrix, here's a brute force
method to calculate the Characteristic Polynomial.
You then call a routine that Solves the cubic Equation with the following
coefficients.
Here, 'a is assumed to be 1.

Sub Demo()
Dim m
Dim b, c, d
Dim Det

m = [A1:C3]

'A future item to check...
'If Det = 0 then...
Det = WorksheetFunction.MDeterm(m)

'//=======================================
'// Characteristic Polynomial =
'// x^3 + b*x^2 + c*x + d = 0
'//=======================================

b = -(m(1, 1) + m(2, 2) + m(3, 3))

c = m(1, 1) * m(2, 2) - m(1, 3) * m(3, 1) - _
m(2, 3) * m(3, 2) + m(1, 1) * m(3, 3) + _
m(2, 2) * m(3, 3) - m(1, 2) * m(2, 1)

d = m(1, 3) * m(2, 2) * m(3, 1) - _
m(1, 2) * m(2, 3) * m(3, 1) - _
m(1, 3) * m(2, 1) * m(3, 2) + _
m(1, 1) * m(2, 3) * m(3, 2) + _
m(1, 2) * m(2, 1) * m(3, 3) - _
m(1, 1) * m(2, 2) * m(3, 3)

Debug.Print b
Debug.Print c
Debug.Print d
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Mark" wrote in message
...
basically I am trying to determine the math steps for determining the
eigenvalues for a nxn matrix where n= either 3 or 4.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default I am trying to determine eigenvalues for an nxn matrix where n2

It looks like the longer equation for d can be reduced...

Change:
d = m(1, 3) * m(2, 2) * m(3, 1) ...etc


to:

Det = WorksheetFunction.MDeterm(m)
d = -Det

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003

<snip


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 989
Default I am trying to determine eigenvalues for an nxn matrix where n2

OK... I am assuming that this is a macro code. Let me give it a whirl.
Thanks for the help. I'll let you know how it worked.

thanks,
"Mark" wrote:

basically I am trying to determine the math steps for determining the
eigenvalues for a nxn matrix where n= either 3 or 4.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a matrix from data in three column sa02000 Excel Discussion (Misc queries) 3 June 28th 06 02:25 AM
Matrix Problem Jeff Excel Discussion (Misc queries) 1 February 4th 06 07:36 PM
Matrix calculation Maarten Excel Discussion (Misc queries) 3 September 29th 05 03:29 PM
How to identify entries in a matrix also present in another list larkindale Excel Worksheet Functions 2 September 16th 05 07:07 PM
Recreate the upper part of a symetric data matrix 75x75 Michael Cantinotti Excel Discussion (Misc queries) 4 May 23rd 05 05:04 PM


All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"