Finding Local mean value of pixels of window

I want to solve the equation (2) in the attached picture which tells the local mean value. But i don't have any idea about how to evaluate this equation using matlab code. could only guess w indicates window size. What does g(m,n) means? Can anyone please help me to understand this concept?

• There is nothing to solve here. Equation 2 is a definition of $\bar{g}$. All you need to do is to evaluate it. – A_A Feb 27 at 7:41
• yes i dont have any idea about how to evaluate it. – Emerson EJ Feb 27 at 8:28