how can we generate a vector of length 100 with random number in between 0 and 1 with uniform probability such that sum of these numbers/100 is equal to 0.75
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anil Kumar
el 10 de Mzo. de 2021
Respondida: Rohit Pappu
el 15 de Mzo. de 2021
need X vector of length 100 which only contains values in between 0 and 1
like X = [0.8 0.03 0.5 0.8 0.95 .......] such that sum(X)/100 = 0.75
0 comentarios
Respuesta aceptada
Rohit Pappu
el 15 de Mzo. de 2021
Please use randfixedsum, available on the File Exchange
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical 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!