How To Generate Non Repeating floating Random Numbers from 1 to 10
Mostrar comentarios más antiguos
Hi,
Does anybody know how to generate a series of 100 non-repeating random floating numbers between 1 and 10?
Thanks
Respuesta aceptada
Más respuestas (1)
Andrei Bobrov
el 26 de Nov. de 2019
z = cumsum(rand(100,1));
mn = min(z);
Z = 9/(max(z) - mn)*(z - mn) + 1;
out = Z(randperm(100));
Categorías
Más información sobre Birthdays 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!