Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Solving Simultaneous Equations with Matrices

by flyingmoose (Priest)
on Apr 26, 2004 at 16:01 UTC ( [id://348226]=note: print w/replies, xml ) Need Help??


in reply to Solving Simultaneous Equations with Matrices

obligatory reference to arbitrary alternative wheels: PDL.
  • Comment on Re: Solving Simultaneous Equations with Matrices

Replies are listed 'Best First'.
Re: Re: Solving Simultaneous Equations with Matrices
by zentara (Archbishop) on Apr 27, 2004 at 11:25 UTC
    You know, I looked at PDL when I wrote this, and it was nearly impossible to use compared to Math::Matrix or Math::Matrix::Real. PDL has a "simq" method to deal with simultaneous equations, but I couldn't figure out from the docs how to use it. The PDL module Math::Matrix:Ops has about 5 lines describing simq......the interface is very obscure.

    I also tried to use PDL to get the inverse of a matrix, which had no inverse, and was given results. Either I had the rows - columns setup wrong, or there is something wacky with PDL.


    I'm not really a human, but I play one on earth. flash japh
      For future reference: a slight surprise with PDL is the first dimension is column, second is row, unlike with Fortran, normal maths, etc. So sequence(2,3) has 2 columns, not 3. Printing out the ndarray shows what's going on. PDL::LinearAlgebra has many useful matrix functions that wrap lightning-fast LAPACK routines. I'd recommend that over the routines in PDL::MatrixOps, but see https://metacpan.org/pod/PDL::MatrixOps#lu_backsub for a comparison of the various available ways to solve linear problems with PDL.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://348226]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-24 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found