Re: using random with constraints
- From: Peter Perkins <Peter.PerkinsRemoveThis@xxxxxxxxxxxxx>
- Date: Wed, 13 Aug 2008 13:12:24 -0400
Anna Chen wrote:
hello,
i would like to generate random vectors that have the constraint that the components should sum to zero, and that the components are picked from some distribution.
It's extremely easy to get the first thing, simply generate a vector and subtract off the mean. But "some distribution" is rather vague. What distribution? Do you care what distribution? For example, this
x = rand(1,10); x = x - mean(x);
draws from the "modified 10-dimensional shifted uniform distribution" that I just made up. I bet that isn't the distribution that you're looking for.
Hope this helps.
.
- References:
- using random with constraints
- From: Anna Chen
- using random with constraints
- Prev by Date: Re: FFT returns NAN
- Next by Date: Re: Very basic question
- Previous by thread: Re: using random with constraints
- Next by thread: nonlinear least squares fit
- Index(es):
Relevant Pages
|
Loading