How to generate random points in a particular angle ?

1 visualización (últimos 30 días)
SUSHMA MB
SUSHMA MB el 7 de Jun. de 2017
Comentada: Torsten el 8 de Jun. de 2017
I need to generate random points in a particular angle, i.e., in a conic shape.
  1 comentario
Adam
Adam el 7 de Jun. de 2017
Points in how many dimensions? Please give a more specific question.

Iniciar sesión para comentar.

Respuestas (1)

Torsten
Torsten el 7 de Jun. de 2017
Generate a random point in a box that contains your conic. Accept the random point if it falls into the conic, otherwise reject it.
Best wishes
Torsten.
  2 comentarios
SUSHMA MB
SUSHMA MB el 7 de Jun. de 2017
Can you please explain with an example.
Torsten
Torsten el 8 de Jun. de 2017
The answer by "Loginatorist" shows the principle for uniformly distributed points in a circle of radius r:
https://de.mathworks.com/matlabcentral/answers/294-generate-random-points-inside-a-circle
Best wishes
Torsten.

Iniciar sesión para comentar.

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by