How can I calculate a weighted mean in Matlab?
738 views (last 30 days)
I have a 180-by-360 matrix of (surface temperature) values and I want to calculate a weighted average of all values given in this matrix. However, I need to weight these values with respect to latitude. Is there a way to calculate a weighted mean in Matlab? Please help me.
Thanks in advance for any help!
More Answers (2)
John Hock on 28 Apr 2019
I just want to ask one thing that if i have 2d array 2*4 and want to get weighted average with vector of 1*4
i want first row of A get multiplied with B and give weighted average as an output similarly for next row.