weighted average for an array

4 visualizzazioni (ultimi 30 giorni)
Anisha Varughese
Anisha Varughese il 29 Lug 2019
Risposto: Anisha Varughese il 29 Lug 2019
Hey
Can someone please tell me how to use weighted average for an array
  5 Commenti
Adam Danz
Adam Danz il 29 Lug 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 il 29 Lug 2019
sum(weights.*array)
is ok if sum(weights) == 1; the general rule is
sum(weights.*array)/sum(weights)

Accedi per commentare.

Risposte (1)

Anisha Varughese
Anisha Varughese il 29 Lug 2019
Thank you.

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by