random numbers that sum up to a definite integer
Show older comments
hi, i would like to generate a column vector using rand function e.g rand(5,1), so that none of the element is bigger than 1 and less than 0. and i want the sum of all the elements to equal 1 exactly. how do i do it?
Accepted Answer
More Answers (0)
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!