Chris Beaumont's IDL Library

Download source code

single page | use frames     summary     class     fields     routine details     file attributes

./

pwpl.pro

toppwpl

Statistics

result = pwpl(xmins, alphas [, x=x] [, random=random])

This function evaluates, or returns samples drawn at random from, a PieceWise Power Law distribution.

Return value

If x is set, the function returns f(x). If random is set, the function returns a set of numbers at random from dN/dx = f(x). f(x) is given by the following equation dN / dx = Const * x^alpha[i], for x[i] <= x < x[i+1] If x < x[0], then dN / dx = 0

SEE ALSO: imf

TODO: Implement RANDOM keyword

Parameters

xmins in required

A vector specifying the abscissas of the powerlaw boundaries in increasing order. These are the lower bounds for each piecewise segment.

alphas in required

The power law exponents at each of the boundaries

Keywords

x in optional

A set of abscissas against which to evaluate the power law

random in optional

Set to an integer n to return n samples drawn from this distribution

File attributes

Modifcation date: Mon Mar 22 16:17:13 2010
Lines: 104