Nice Integer Eigenvectors
|
03-26-2015, 02:38 PM
Post: #1
|
|||
|
|||
Nice Integer Eigenvectors
This program gives you nice integer eigenvectors for 2x2 and 3x3 matrices rather than the normalised ones given by the EIGENVV program (or the seemingly random mess that the HP39gii gives out).
EIGEN() will output a list of a matrix of column eigenvectors and its diagonalisation if possible or a vector of eigenvalues if not possible. EIGVALS() outputs a vector of eigenvalues EIGVECT() outputs a single eigenvector matrix (vectors as columns). it only works for matrices with real integer eigenvalues. If it can't solve the problem it falls back to EIGENVV (ie if it is non-integer, complex or not 2x2 or 3x3). eg: Comparison of output: EIGENVV() Vs EIGEN() It will also solve some problems that EIGENVV fails on. eg: EIGENVV() and EIGENVAL() Vs EIGEN() and EIGVALS() Code: EIGVALS(matrix); //declare_EIGVALS_here_to_preserve |
|||
03-31-2015, 12:55 PM
Post: #2
|
|||
|
|||
RE: Nice Integer Eigenvectors
The command eigenvects() -- in lower case -- gives the eigenvectors in rational form and works for larger sized matrices. You could probably write a simpler function that then converts rational vectors to a parallel integer vector (and apply gcd for smaller integers).
Graph 3D | QPI | SolveSys |
|||
03-31-2015, 09:59 PM
Post: #3
|
|||
|
|||
RE: Nice Integer Eigenvectors
(03-31-2015 12:55 PM)Han Wrote: The command eigenvects() -- in lower case -- gives the eigenvectors in rational form and works for larger sized matrices. You could probably write a simpler function that then converts rational vectors to a parallel integer vector (and apply gcd for smaller integers). WOW! That is a great improvement over the ole EIGENVV, why didn't anyone tell me about this command? But unfortunately it falls short - it seems to ignore repeated eigenvalues. eg. running it on 5|-4|0 1|0|2 0|2|5 gives only one eigenvector (-4,-5,2) which corresponds to the eigenvalue 0. There are also two more eigenvalues: 5 and 5 for which there is one more eigenvector. My program gives (2,0,-1) as well as (4,5,-2). I've tried it on some other matrices with repeated eigenvalues too and it always ignores them!! Shame... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)