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

Most Wise Monks, I am an ex-graduate student (and poor college professor who is temporarily replacing other faculty whilst still having to process data and write papers) who is looking for a cheap (i.e., free) replacement for Matlab and graphing software such as Sigmaplot. I was wondering whether Perl or Python with Numerical Python and SciPy are good replacements for these two software packages, and how one would implement these. Happy New Year, Dr. Guy

Replies are listed 'Best First'.
Re: Matlab, Perl, and Python
by diskcrash (Hermit) on Jan 01, 2006 at 23:06 UTC
    Dear Dr. Guy,

    Have you looked at octave ? www.octave.org

    It runs most Matlab code and the graphics are useful, if not as pretty.

    Diskcrash

      Dear Diskcrash, I did. I also downloaded Scilab so I'll try that out, but I am looking for something that requires minimal effort in translating between Matlab and another language. Also, something that works well with text files, something that I noticed Matlab does not do well (in fact, I used a modified Perl script for some of that). I will, however, try it out once I figure out Cygwin a bit better- I am currently using WinXP. Thanks, Dr. Guy
Re: Matlab, Perl, and Python
by moklevat (Priest) on Jan 02, 2006 at 16:00 UTC
    I think it depends on what you are doing with Matlab and Sigmaplot. There is a nice PM tutorial on perl and math. If you are doing statistical analysis and graphing I would suggest looking into the free and open source scientific software package R. There is also a perl module to interface with R Statistics::R. Furthermore, if you are doing informatics work, you might be interested in the free/OS bioconductor add-on packages for R.
Re: Matlab, Perl, and Python
by jkao (Beadle) on Jan 02, 2006 at 08:32 UTC
    As others have pointed out, Octave is probably the best open-source replacement for Matlab. It uses Gnuplot for graphics, and there's a graphics front end KOctave for KDE users. Also look into xmgrace.
Re: Matlab, Perl, and Python
by traveler (Parson) on Jan 02, 2006 at 00:06 UTC
      I gave it a brief spin and it's pretty nasty, particularly if you look at the internals. If you're doing serious numerical work, I'd go for Octave -- it links in to your platform's BLAS and LAPACK, along with a whole lot of other third party math libs. It also has a pretty clean interface for hooking in your own C++ extensions (see here).

      You're right that Octave sucks for text manipulation, but I do alright using it for bioinformatics. The best way I've found is to preprocess the input in Perl, then have your Perl script write out its results in Octave's text save-file format (which is pretty self-explanatory). Inline::Octave doesn't seem to be worth the trouble -- it's almost as easy to just use a pipe.

Re: Matlab, Perl, and Python
by srdst13 (Pilgrim) on Jan 02, 2006 at 23:24 UTC

    Depending on your needs, look at PDL.

    Also, I can't say enough positive about R. It is free and will be fairly easy to pick up after using Matlab. The user community is FANTASTIC, an important aspect of anyone on a budget and in a rush. It is not at all unusual to write to the R-help email list (about 2000 posts/month) and get several replies within minutes. I work next to a Matlab user of many years and have the option of using it anytime I like, but largely because of its open-source nature and user community, I continue to use R. As for functionality, it lacks nothing next to Matlab and does have some nice features for working with perl (RSperl, Statistics::R). Finally, it is available as a binary for Windows.

    Just my biased 2-cents worth.

    Sean

      Thanks for the input. :)

      I have used R in the past, but it was part of a spatial statistics course which many of us in the class wanted to forget about (don't ask, the professor was nice, but didn't know how to teach), but I will download the binary. Actually what I am doing is signal processing and modeling of ground-penetrating radar data as well as estimation/ modeling of dielectric properties and so on. I'll definitely check Octave out now that I installed the full complement of Cygwin on my machine.

      Thanks,
      Dr. Guy