Populate an array with n number of points based on probability
Mostrar comentarios más antiguos
I have a 15x15 array filled with values ranging from 0 to 10. This is my probability array.
I want to create a second 15x15 array and populate it with 25 points that are 'randomly' generated, except I want the cells with higher values in the probability array to have a higher chance of generating one of the 25 points.
The probability array represents the z values from a surface I have plotted so in principal what I'm trying to do is fit a probability distribution function to a non-uniform, non-normal 3D surface and then use this to generate points. But in a simple manner.
2 comentarios
KALYAN ACHARJYA
el 6 de Nov. de 2019
Sorry I did mot get the question, can you elaborate with examples?
Samuel Mousley
el 6 de Nov. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!