Question: how to calculate weighted average in matlab?
Answer: Accepted Answer wAvg = sum(Y(range). *weight)/sum(weight); In you example centerPoint will be 125, and larger the spread more slowly the weight will decrease away from centerPoint.