mili3431 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am new to perl. The program I am writing includes a lot of computation and I need to work with matrices (define,multiply,inverse) and solve systems of linear equations. Does anyone know a good package for matrices? Thanks,

Replies are listed 'Best First'.
Re: Matrix Package
by biohisham (Priest) on Jan 29, 2010 at 21:08 UTC
Re: Matrix Package
by ikegami (Patriarch) on Jan 29, 2010 at 21:13 UTC
    PDL is a fast math module that specializes in matrices.
      ikegami understates - PDL is the comprehensive linear algebra package for Perl. Its major downfall is its documentation though. Knowing some C is almost a prerequisite. Other CPAN modules may be better suited depending on the complexity of the task.

        I don't know which class of problems you've solved with PDL that requires C knowledge, but I've been using PDL for many years and have very rarely needed to do any coding in C (and then only when working on extremely compute intensive problems). I've worked with a number of people with little or no knowledge of coding outside of Perl who have very successfully used PDL to solve complex problems. In my experience, knowledge of C is definitely not a prerequisite.

        You do have to parse the documentation, but there's a very helpful community of users that can point you in the right direction. Matrix questions pop up on the users mailing list often; see http://pdl.perl.org/maillists/

        when you don't know what you're talking about it's hard to express a competent oppinion