From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Weighted random number generator
Date: Tue, 22 Jul 2008 13:04:02 +0000 (UTC)
Organization: Atlantic Inertial Systems
Lines: 20
Message-ID: <g64ls2$22d$>
References: <g647ip$2d5$> <g64alt$1kr$> <g64fa3$hc7$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1216731842 2125 (22 Jul 2008 13:04:02 GMT)
NNTP-Posting-Date: Tue, 22 Jul 2008 13:04:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1405925
Xref: comp.soft-sys.matlab:480935

"stinkinrich88 Coombez" <> wrote in
message <g64fa3$hc7$>...


> a curve. Is there a way I can adjust the steepness of the
> slop while keeping it flat? 

Maybe I'm missing something.  But if you want the pdf to be
a straight line...  It has to pass through (0,0) and (1,x)
where x is determined by the number of bins.  so how is the
slope going to change?

another way:

N = 1e5;
vRandom = rand(1, N);
vWeighted = vRandom.^0.5;