help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: radial gaussian distribution


From: roberto
Subject: Re: radial gaussian distribution
Date: Tue, 20 Sep 2005 15:35:35 +0200

On 9/20/05, Ted Harding <address@hidden> wrote:
> On 20-Sep-05 roberto wrote:
> > Hello,
> > i have to generate a gaussian distribution of points which depends
> > only on the distance from a fixed point O, that is i need a radial
> > gaussian distribution;
>
> If you want a bivariate gaussian distribution (i.e. (X,Y) are
> jointly gaussian) where the probability density depends only
> on the distance r = sqrt((x-x0)^2 + (y-y0)^2) from a fixed
> point (x0,y0), then you are in fact dealing with a "circular"
> (or, in 3 dimensions, "spherical", etc.) gaussian distribution.
>
> So, if 's' is the marginal standard deviation of either X or Y
> (i.e. s^2 is the variance),
> 
>  [x0 + s*randn(N,1)  y0 + s*randn(N,1)]
> 
> will generate a matrix of N rows, each with 2 elements(X,Y)
> where X and Y are independent, each with variance s^2, with
> X centred on x0 and Y on y0, so that the centre of (X,Y is
> (x0,y0) and their joint distrubution is centred on (x0,y0).
>
thank you for your clear answer;
i restate my need: my problem is i want to compute a certain function
"c(r)" on a set of points gaussian-distributed around an origin O(0,0)
on a two dimensional region and whose distance from this point O is
just r;

in my opinion the codes posted before both achieve the same result: 
- one generate the following "r" variable using "randn":
r = R*randn(N,1);
with width "R"
on which i have to compute my function c(r);

and this "r" should correspond to the other one (posted by Ted)
r = sqrt((x-x0)^2 + (y-y0)^2)

made up of two gaussian distributed x and y coordinates;
so, once i got this set of points gaussian distributed around O(0,0)
with distance r from O, i will compute my c(r) on them,

hope i have been simpler in my explanation and tell me if something
still not clear
thank you for any help


-- 
roberto
debian sarge, kernel 2.6.8



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]