From: "Dmitrey Yershov" <>
Newsgroups: comp.soft-sys.matlab
Subject: Generate random numbers with fixed sum and different constraints
Date: Wed, 14 Nov 2012 14:19:17 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 5
Message-ID: <k80995$9eo$>
Reply-To: "Dmitrey Yershov" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1352902757 9688 (14 Nov 2012 14:19:17 GMT)
NNTP-Posting-Date: Wed, 14 Nov 2012 14:19:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3853991
Xref: comp.soft-sys.matlab:782767

Hello. I need to generate non-negative rundom numbers sum of which is equal to 1. Each number xi is constrained: ai<=xi<=bi. How can I do this? Similar question was solved here

but in this alghorithm a<=xi<=b (a and b are the same for all xi). Any ideas?