MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: rician random number

"gcseng at" wrote:

>Anyone knows how to generate random number base on the rician
>probability density function.

>The rician pdf is given by:


>where 2*sigma^2 is the average power in the scatter component of the
>fade, and Io(.) is the modified Bessel function of the first kind and
>zeroth order.

I suggest you use an approximate method based on an idea by Paul Abbott:

First, give some constant value to your A and sigma, say, A=sigma=1 (no
loss of generality).

f[r_]=\!\(E\^\(1\/2\ \((\(-1\) - r\^2)\)\)\ r\ BesselI[0, r]\)

and construct a table of values of the corresponding cumulative
distribution function, with as many points as you wish. A plot of the
density function indicates that it is positive on the range 0 to 7, at
most, so that you can take 70 points, i.e. one every tenth of a unit.
The table, say t, is calculated by means of


and you get an approximation to the true distribution function through


You can check on the goodness of the approximation by plotting a graph
of the derivative of h and comparing it with the original f. You'll be
surprised (anyway, I was!).

Construct a plot of h:


Extract the plotpoints (which takes advantage of the adaptive code built
into Plot):


and then numerically compute the inverse function using interpolation:


Then if you take a random number uniformly distributed in (0, 1) and
transform it through c, you get a random number which follows the
distribution f, i.e. the rician distribution. A sample of ten rician
random numbers:



Good luck,

Tomas Garza
Mexico City

  • Prev by Date: Re: Simple MathLink question
  • Next by Date: Making Change
  • Previous by thread: rician random number
  • Next by thread: RE: rician random number