SandMatrix Routine of the week: Pseudo-Inverse
|
12-28-2014, 11:37 AM
(This post was last modified: 12-28-2014 11:41 AM by Ángel Martin.)
Post: #1
|
|||
|
|||
SandMatrix Routine of the week: Pseudo-Inverse
Even if the convergence is finicky, using the BenIsrael-Cohen algorithm it takes a relatively short program to calculate the Moore-Penrose matrix pseudo-inverse. 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/COHEN-BI-ITER-GI.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: Pseudo-Inverse - Ángel Martin - 12-28-2014 11:37 AM
RE: SandMatrix Routine of the week: Pseudo-Inverse - Gene - 12-28-2014, 08:48 PM
|
User(s) browsing this thread: 1 Guest(s)