Azzera filtri
Azzera filtri

How to extract a PDF from points with a weigh attached to them

2 visualizzazioni (ultimi 30 giorni)
I Have a n by 3 matrix (lets say n = 100) where the 2 first collums are the x and y position of the point. The third collum is the weight of the particle (that got updated in a previous command). Now I would like to extract a bivariate norm pdf from these weighted points. I have found the fitgmdist command, but this does not include the weight of the points. Is there a way to do this. I have to say i'm still quite new in the matlab software Thanks

Risposte (1)

Peter Cook
Peter Cook il 18 Ott 2017
Modificato: Peter Cook il 18 Ott 2017
I don't know if there's a canned function for this - you could try:
1. Compute weighted mean for each column of X
2. Compute covariance matrix using weighted mean (or skip #1 and compute a weighted covariance matrix directly - I am not sure if this produces the exact same result)
3. Compute eigenvalues & eigenvectors of covariance matrix
4. Use the eigenvectors corresponding to 2 largest eigenvalues to extract coefficients for the bivariate normal distribution

Categorie

Scopri di più su Descriptive Statistics 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