From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to generate random variable with constraint?
Date: Tue, 20 Jul 2010 02:05:06 +0000 (UTC)
Organization: The Mitre Corp
Lines: 9
Message-ID: <i2308i$7p$>
References: <i22vhv$frn$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1279591506 249 (20 Jul 2010 02:05:06 GMT)
NNTP-Posting-Date: Tue, 20 Jul 2010 02:05:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2318
Xref: comp.soft-sys.matlab:654432

"jay " <> wrote in message <i22vhv$frn$>...
> I need to generate 5 random variables between [0,1], let's say a, b, c, d, e. The constraint is that a<b<c<d<e. How to make this happen? Please advise. thanks

doc rand
doc sort

It seems to me that the only way 5 random numbers wouldn't 
satisfy that constraint is if 2 or more of them are equal.  
A very unlikely event.