SandMatrix Routine of the week: PseudoInverse

12282014, 11:37 AM
(This post was last modified: 12282014 11:41 AM by Ángel Martin.)
Post: #1




SandMatrix Routine of the week: PseudoInverse
Even if the convergence is finicky, using the BenIsraelCohen algorithm it takes a relatively short program to calculate the MoorePenrose matrix pseudoinverse. Once the initial estimation is calculated it's a matter of a few iterations until the final result is obtained  although each iteration also takes its time.
For additional references see: http://benisrael.net/COHENBIITERGI.pdf and JM Baillard's page: http://hp41programs.yolasite.com/pseudoinverse.php The code is listed below; lots of Alpha stuff as they are the input control strings that drive the matrix operations. Also note three auxiliary matrices are needed  mostly due to the M*M instruction that requires a result matrix different from the operands. Code:
You'll need the SandMatrix for functions I<>J, MTRACE and MAT= Auxiliary matrices "P" and "Q" are purged upon completion. The result matrix "#" will not overwrite the initial one. Cheers, 'AM "To live or die by your own sword one must first learn to wield it aptly." 

« Next Oldest  Next Newest »

Messages In This Thread 
SandMatrix Routine of the week: PseudoInverse  Ángel Martin  12282014 11:37 AM
RE: SandMatrix Routine of the week: PseudoInverse  Gene  12282014, 08:48 PM

User(s) browsing this thread: 1 Guest(s)