Just another Perl shrine | |
PerlMonks |
Re: Averaging Elements in Array of Arrayby hda (Chaplain) |
on Dec 26, 2008 at 13:44 UTC ( [id://732675]=note: print w/replies, xml ) | Need Help?? |
Hi! Yes, there is a fast way, using PDL (Perl Data language): http://pdl.perl.org/ Namely you can import your data into a piddle (a PDL object), slice the column and then perform "stats" over that: Where '$column,:' specifies that you want the whole y range (:) of column $column to be dumped into $a. You can, for example iterate over all columns that you want. other more advanced uses are for sure possible, like taking all averages at the same time, but these are beyond my current knowledge. Hope this helps
In Section
Seekers of Perl Wisdom
|
|