[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: radial gaussian distribution
From: |
Shai Ayal |
Subject: |
Re: radial gaussian distribution |
Date: |
Tue, 20 Sep 2005 14:06:41 +0300 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
will this do it or is it too simplistic?
function [x,y]=rad_randn(R,N)
r = R*randn(N,1);
phi = rand(N1,)*2*pi;
x = r.*sin(phi);
y = r.*cos(phi);
endfunction
This should generate N points with gaussian width (sigma ?) R.
both randn & rand are from octave forge.
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;
may it be useful the definition of the function used in the following:
http://octave.sourceforge.net/index/f/erf_Z.html
??
if possible address me to some documentation useful
thank you for any help
-
-------------------------------------------------------------
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
-------------------------------------------------------------