From: "Tim " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Weighted random number generator
Date: Sat, 26 Mar 2011 01:14:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 1
Message-ID: <imjeks$hc8$>
References: <g647ip$2d5$> <g64alt$1kr$> <g64fa3$hc7$> <g657qb$k2g$>
Reply-To: "Tim " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1301102044 17800 (26 Mar 2011 01:14:04 GMT)
NNTP-Posting-Date: Sat, 26 Mar 2011 01:14:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1592783
Xref: comp.soft-sys.matlab:718233

I'm trying to do something very similar and I'm still confused on how to do it.  Maybe what I'm doing is a bit different.  Normally the random number generator has an equal probability of producing a number between 1 and zero.  I would like to have the probability distribution fit the cosine squared function, with a shift.  So the probability of getting a zero is the highest and the probability of getting pi/2 or -pi/2 is zero.  Does that make sense?