Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
Random numbers generation with variable bound
Replies:
3
Last Post:
Jan 16, 2014 6:32 AM



Simone
Posts:
3
Registered:
1/16/14


Random numbers generation with variable bound
Posted:
Jan 16, 2014 4:20 AM


I need to create a vector of N random numbers x(N) that satisfies the following constraints:
sum x(i) = s lb(i) < x(i) < ub(i) for i ? {1...N}
where s is a scalar and lb(N) and ub(N) are vectors.
Note that the lower and the upper bounds are different for each i. I found randfixedsum function but the upper and lower bounds have to be the same for each number.
How can i solve this problem?



