Generating random number.
Mostrar comentarios más antiguos
Hello,
I have 2 questions to ask:
- I need to generate 5 gaussian distribution data having specified stabndard deviation and particular min and max value.
- I need to genearate 5 gaussian distribution data having minimum distance between 2 point of 2 meter and maximum distance between 2 points as 3.5 meter.
As i had used randn function but not getting data with that particular specification.
Please help regaerding that.
Thanks
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 22 de En. de 2019
0 votos
- Gaussian distribution is always infinite in both tails. It is a contradiction to use gaussian with min and max values.
- Statistics Toolbox offers makedist() and truncate() that together can create a truncated Gaussian.
- #2 is definitely not gaussian distribution.
- Your absolute distince of 2 does not mean much unless we know the standard distribution. Otherwise you are dealing with a minimum span of 8 standard deviations, like [0 2 4 6 8] 5 points no two closer than 2 together, total span is 8. 8 standard deviations is not very common; you would have to generate for a pretty long time to satisify the conditions randomly.
Moby Philip
el 24 de En. de 2019
0 votos
Categorías
Más información sobre Logical 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!