weighted average for an array

3 次查看(过去 30 天)
Hey
Can someone please tell me how to use weighted average for an array
  5 个评论
Adam Danz
Adam Danz 2019-7-29
There isn't enough information in your question to form a useful answer. Weighted averages can be used in many ways. From what we currently know, you have a weighted average and you're asking how to use it or you're asking for code that uses weighted averages. The question is unclear.
dpb
dpb 2019-7-29
sum(weights.*array)
is ok if sum(weights) == 1; the general rule is
sum(weights.*array)/sum(weights)

请先登录,再进行评论。

回答(1 个)

Anisha Varughese
Anisha Varughese 2019-7-29
Thank you.

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by