Generate random numbers with fixed sum and different constraints
Show older comments
Hi. I followed the previous thread http://www.mathworks.com/matlabcentral/newsreader/view_thread/324503
But there is an error message if lo = [1 0 2 1 0] up = [5 6 4 4 2] and s = any number between 2 and 6.
2 and 6 is the max number whose both lower bounds are 0.
Can anybody help me to fix this problem?
Thanks.
1 Comment
Walter Roberson
on 17 Sep 2013
That thread is fairly long. Please indicate which code you used out of it, and also please indicate which message it is within the thread. Look for the Message: 19 of 28 field in the header of the message.
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!