i think you want to calculate the average 2d array..

if you want this refer this link:

finding average in 2d arrays

Otherwise you post your code completely and explain your doubt clearly....