PWPL Purpose
This function evaluates, or returns samples drawn at random from, a
PieceWise Power Law distribution.
Category
Statistics
Calling Sequence
result = pwpl(xs, alphas, x = x, random = random)
Inputs
xmins: A vector specifying the abscissas of the powerlaw boundaries in
increasing order. These are the lower bounds for each piecewise
segment.
alphas: The power law exponents at each of the boundaries
Keyword Parameters
x: A set of abscissas against which to evaluate the power law
random: Set to an integer n to return n samples drawn from this distribution
Outputs
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 Modification History
June 2009: Written by Chris Beaumont