Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <i22vhv$frn$1@fred.mathworks.com> <i24er8$7qs$1@fred.mathworks.com> <Jbj1o.16614$Bh2.16201@newsfe04.iad> <i24fnn$6pu$1@fred.mathworks.com> <YKj1o.92592$Lj2.82402@newsfe05.iad> <i24i60$gfp$1@fred.mathworks.com> <i24l9s$auq$1@fred.mathworks.com> <i24oic$env$1@fred.mathworks.com> <i24pu1$d60$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1279652946 15892 172.30.248.38 (20 Jul 2010 19:09:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 20 Jul 2010 19:09:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:654693

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i24pu1$d60$1@fred.mathworks.com>...

>   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...