weighted average for an array

4 ビュー (過去 30 日間)
Anisha Varughese
Anisha Varughese 2019 年 7 月 29 日
回答済み: Anisha Varughese 2019 年 7 月 29 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by