Weighted Standard deviation?

Hey, I'm new to matlab, and cant seem to find a simple way to calculate weighted standarddeviations.
For the weighted mean, i can specify wmean(impactperkg, kgs) where the number of kg is the weighting. For the weighted median, the function "weightedMedian" can be used. Is there a similar function one can use for the std?
I'm confused to as if ts_std can be used for this purpose?
Cheers

 Réponse acceptée

Tom Lane
Tom Lane le 30 Avr 2012

1 vote

The "var" function will accept weights, and you can take the square root of the result.

Plus de réponses (1)

Hanna
Hanna le 30 Avr 2012

0 votes

easy! thanks so much, i didnt even consider checking the var function :s

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by