I don't think there is a built-in function that explicitly does what you are asking for, but you shouldn't need a seperate for loop to do the processing.
I assume that because the 2D loop is coming from a FOR loop that there is probibly something (acquisition routine?) inside the loop that is generating a 1D array (the rows in your output). This 1D array is then accumulated into a 2D array at the border of the FOR loop.
If this is so, all you have to do is sum the elements of each 1D array inside the loop and divide the result by the N value for the loop. You can then do whatever you need to do to return the calculated results in the desired form.
In general look for times in which you have two consecutive FOR loops that are executing the same number of
times. Very often you can simplify the code by consolidating the functions into a single loop.
If you post your code (in V6.0 format) I'll look at it for you and show you what I mean.
Mike...