How to generate a random array of 1*N matrix in which sum of all elements is 1 and numbers generate should be upto 1 decimlal place only.
Ältere Kommentare anzeigen
For eg. [0.4 0.3 0.3] It should be generated randomly.
2 Kommentare
Roger Stafford
am 13 Nov. 2014
If N is large, restricting the array values to one decimal place only would force many of the values to be zero if I understand you correctly. Are you sure this is what you want?
Abhinav
am 13 Nov. 2014
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!