Random number generate - Specific values
Mostrar comentarios más antiguos
Dear community,
I would like to generate 5000 random values, on the follow form:
At the original dataset, there are four values: {7,8.5,9.625,12.25}. Thus, I need a dataset with 5000 values with fours values shown before, in random distribuited.
Can help me, please?
Thank you very much,
Respuesta aceptada
Más respuestas (1)
x=[7,8.5,9.625,12.25];
z=x(randi(4,1,7)) % 7 randomly selected from x
z=x(randi(4,1,5000)); % 5000 randomly selected from x
Good luck.
1 comentario
Guilherme Lopes de Campos
el 19 de Sept. de 2023
Categorías
Más información sobre F Distribution 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!