From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to generate random variable with constraint?
Date: Tue, 20 Jul 2010 19:09:06 +0000 (UTC)
Organization: Xoran Technologies
Lines: 14
Message-ID: <i24s8i$fgk$>
References: <i22vhv$frn$> <i24er8$7qs$> <Jbj1o.16614$Bh2.16201@newsfe04.iad> <i24fnn$6pu$> <YKj1o.92592$Lj2.82402@newsfe05.iad> <i24i60$gfp$> <i24l9s$auq$> <i24oic$env$> <i24pu1$d60$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1279652946 15892 (20 Jul 2010 19:09:06 GMT)
NNTP-Posting-Date: Tue, 20 Jul 2010 19:09:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:654693

"Roger Stafford" <> wrote in message <i24pu1$d60$>...

>   Matt, you shouldn't give people solutions that are distinctly inferior just because their code would run faster.  

Roger, see my revision in Message #18. It seems to be a better contender. 

In any case, yes, I would hate for Jay to walk away without knowing the limitations of the solutions we propose, but I'm still feeling my through it myself. 

Even if I haven't figured out exactly how, it seems distinctly intuitive that we should be able to derive this with cumsum because the jumps between a<b<c<d,etc... 
form a positive-valued Markov process 
(like cumsum(rand(1,N)). So you would think it possible to derive the solution from this.

Should I be brainstorming out loud on the NG? Debatable, but I've seen lots of people here do it...