RPN Program for Eigenvalues? Message #1 Posted by Ángel Martin on 23 Mar 2004, 7:50 a.m.
Hello Mathheads,
I've been looking for an RPN program that calculates all the Eigenvalues for a generic case, NxN square matrix. Tthat is to say not limited to 3x3, or 4x4, etc.
I'd appreciate your hints if you know of such a program being available somewhere.
BTW, the program below will solve for real eigenvalues, but of course won't find complex values, nor there's a foolproof method (depends on initial guesses, etc. It is nevertheless an interesting example of the power of the advantage matrix functions, combined with solve.
LBL "*VP"
STO 00
"IDN"
XROM "MIDN"
RCL 00
"X"
MAT*
"IDN,AA,IDN"
MAT
"IDN"
MDET
RTN
LBL "EIGEN"
"DIM=?"
PROMPT
"AA"
MATDIM
XROM "IMR"
DIM?
"IDN"
MATDIM
E
ENTER^
50
"*VP"
SOLVE
"VP="
ARCL X
AVIEW
END
