function wm = weightedMean(x,w)
%{
Compute the weighted mean of x using weights w

Dick Startz
July 2016
%}
if length(x) ~= length(w)
    error('Arguments must be same length');
end
wm = sum(x.*w)/sum(w);

end

