Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <g647ip$2d5$1@fred.mathworks.com> <g64alt$1kr$1@fred.mathworks.com> <g64fa3$hc7$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216731842 2125 172.30.248.37 (22 Jul 2008 13:04:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Jul 2008 13:04:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1405925
Xref: news.mathworks.com comp.soft-sys.matlab:480935


"stinkinrich88 Coombez" <stinkinrich88@gmail.com> wrote in
message <g64fa3$hc7$1@fred.mathworks.com>...

<SNIP>

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

~Adam