Don't ask to ask, just ask | |
PerlMonks |
Re: how to get average of matrices' elements?by choroba (Cardinal) |
on Nov 30, 2016 at 23:35 UTC ( [id://1177000]=note: print w/replies, xml ) | Need Help?? |
To work with matrices, use PDL. Update I've got it! It's super easy. Just pile the matrices one on another, and then project the 3D matrix by average in the z dimension:
Old contents I'm not yet familiar with it, so I had to compute the average myself by adding the matrices and dividing the result by their number, but maybe there already is a function to compute the average per element, or at least to apply a function per element.
In Section
Seekers of Perl Wisdom
|
|