I haven't used PDL, but
Math::Matrix might suit your needs. You mention that speed is important, so a couple of caveats: it's written purely in Perl (no optimised C code; I don't know if PDL or any other matrix module uses optimised C code), and the equation solver uses the Gauss Jordan elimination algorithm which has a run time of O(n^3). This last point is probably only important if you're using very large arrays... you didn't mention this, though, so I'm guessing you're using only relatively small arrays with fewer than (say) 30 unknowns. If that's the case, the Gauss-Jordan will most likely be fast enough.
As for your example of the sorts of systems you want to solve, I take it that each equation you gave represents a complete set of simultaneous equations? It wasn't clear, but I wondered whether you meant that all three matrix equations needed to be solved together rather than individually. If that is the case, can you rewrite the equations to involve only one matrix (the co-efficients) times a vector (of unknowns) = a vector (the result)?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.