weighted average for an array

12 vues (au cours des 30 derniers jours)
Anisha Varughese
Anisha Varughese le 29 Juil 2019
Hey
Can someone please tell me how to use weighted average for an array
  5 commentaires
Adam Danz
Adam Danz le 29 Juil 2019
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 le 29 Juil 2019
sum(weights.*array)
is ok if sum(weights) == 1; the general rule is
sum(weights.*array)/sum(weights)

Connectez-vous pour commenter.

Réponses (1)

Anisha Varughese
Anisha Varughese le 29 Juil 2019
Thank you.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by