Datasample - is there a normal distribution equivalent?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi there, is there a normal distribution equivalent to the function 'datasample' ? I want to subsample 100 points according to the gaussian distribution from points with their x y and z coordinates stored in a 3 x 4913 matrix. I would use something like y = datasample(x,5,2,'replace',false) butI know that this is based on the uniform distribution. Instead of randomly sampling according to some mean and variance based on my data I wanted to actually subsample from my dataset so that the values given will actually correspond to values that I have in my dataset. Is there any way I can do this?
0 comentarios
Respuestas (1)
Peter Perkins
el 23 de Abr. de 2013
Bran, I'm not sure I understand your question.
If your 3x4913 matrix itself represents a sample fro a tri-variate normal distribution, then sampling uniformly from it will give you a sample from that normal (or at least approximately -- you'd actually be sampling from an approximation to the original distribution).
datasample also allows you to specify sampling weights, so you may be able to provide weights that are somehow related to normal probability density function. Beyond that, I think you'll need to provide an example of what you're looking for.
Hope this helps.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!