Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: How to calculate weighted mean in Matlab
Posted:
Feb 18, 2013 2:16 AM


A = rand(181,360); % your data Latitude = repmat(90:90,[1 360]); % latitude correspond
W = cos(pi/180*Latitude); meanData = sum(A(:).*W(:)) / sum(W(:))
% Bruno



