dave@bgtys6.uucp (Dave Hubert) (02/19/91)
Does anyone have any good eiganvalue/eigenvector programs for the HP-48sx, or any other useful linear math programs?? (Text-format, cause I have to type it in). I would also appreciate someone sending me a list of bugs with version D rom for 48sx. I read something about problems with polar representation? I've tried talking to HP, and they didn't help at all. Apparently, HP is not in the buisness of giving out lists of bugs with the rom, but HP will appreciate you telling them any problems you've been having, so they can add it to their list. The 1-800 number I called in Canada didn't even know about the different versions of rom. Does anyone know if there is an upgrade available for Canada? I am in a bachelor of mathematics program, and I'll probably start to run into the polar bug or whatever sooner or later. Help? Someone?? Thanks in advance... ----------------------------------------------------------------------- Dave Hubert | ___ ___ Ottawa, Canada | This is where you paste the / / /\ // / (613) 763-8979 | standard disclaimer to any /--< / \ //\_/ U of Waterloo | intelligence whatsoever. /___// \// \ Coop, Math-CS | -- Bell Northern Research -- -----------------------------------------------------------------------
akcs.tasmith@hpcvbbs.UUCP (Ted A Smith) (02/20/91)
I just happen to have some eigenvalue/eigenvector routines... Here is a quick and dirty eigenvalue/eigenvector decomposition for real symetric matricies. I used the Jacobi method. The termination test is a hack (I just test to see if the eigenvector matrix has changed in a given pass!) I don't have any idea if there is a possibility of non-termination. Eigen takes a real symetric matrix in level 1 and returns the matrix of eigenvectors in level 2 and the eigenvalues are along the diagonal of the matrix in level 1. (The offdiagonal values should be small in relation to the diagonal values.) EClr can be used to 0 the offdiagonal values. EFun takes a real symetric matrix (M) in level 2 and a function of 1 real arg (F) in level 1 and returns F(M) in level 1. For example in analogy with 'SIN(x)^2+COS(x)^2==1': [[ 1 2 3 ] [ 2 4 5 ] [ 3 5 6 ]] DUP \<< SIN \>> EFun DUP * OVER \<< COS \>> EFun DUP * + [[ .999999999981 9.89E-12 -1.881E-11 ] [ 1.188E-11 .999999999959 -3.3E-12 ] [ -1.801E-11 -2.3E-12 .999999999962 ]] Ted A Smith PO Box 6308 Longmont CO 80501 H) (303)651-2092 W) (303)447-1572 HPBBS - akcs user tasmith Feb 6, 1991 %%HP: T(3)A(D)F(.); DIR Eigen \<< DUP IDN SWAP DUP SIZE 1 GET \-> d \<< DO OVER SWAP 1 d 1 - FOR i i 1 + d FOR j DUP { j j } GET OVER { i i } GET - OVER { i j } GET 3 PICK { j i } GET + IF DUP THEN / IF DUP THEN DUP SIGN SWAP ABS DUP SQ 1 + \v/ + / ELSE DROP 1 END DUP SQ 1 + \v/ INV SWAP OVER * DUP NEG 4 PICK IDN { j i } ROT PUT { i j } ROT PUT { i i } 3 PICK PUT { j j } ROT PUT ROT OVER * OVER TRN 4 ROLL * ROT * ELSE DROP2 END NEXT NEXT UNTIL ROT 3 PICK SAME END 1 d FOR i 1 d FOR j IF i j SAME NOT THEN { i j } 0 PUT END NEXT NEXT \>> \>> EFun \<< \-> f \<< Eigen 1 OVER SIZE 1 GET FOR i { i i } DUP2 GET f EVAL PUT NEXT OVER TRN * * \>> \>> EClr \<< DUP SIZE 1 GET \-> d \<< 1 d FOR i 1 d FOR j IF i j SAME NOT THEN { i j } 0 PUT END NEXT NEXT \>> \>> END Sorry about the indentation... Must be a tab stop problem. A casual read indicates no problems however.