Sean O'Byrne wrote:
> So what do you do if you have a 2-d matrix, 3-d matrix, 5-d matrix
that 
> you want the mean of?  In MATLAB, finding the mean of a 5-d matrix 
> involves typing mean(mean(mean(mean(a)))).  Comparing this with
mean^:5 
> a (or better still mean^:_ a for the general case) is illuminating.

   mean=:+/ % #
   d5=:?.(5#4)$0
   mean^:_ d5
0.505807
   mean,d5
0.505807

-- 
Raul

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to