Code covered by the BSD License
-
distrmu(distr, dpar)
DISTRMU a table-lookup function. For a given handle to an external
-
distrstat(distr, dpar)
-
simbinom(npoints, n, p)
SIMBINOM random numbers from binomial distribution
-
simdiscr(npoints, pdf, val)
SIMDISCR random numbers from a discrete random
-
simexp(M, N, lambda)
SIMEXP random numbers from exponential distribution
-
simgeom(npoints, p)
SIMGEOM random numbers from geometric distribution
-
simlinear(M, N)
-
simpareto(M, N, alpha)
SIMPARETO random numbers from Pareto distribution:
-
simparetonrm(M, N, alpha, gam...
SIMPARETONRM Generate a matrix of random numbers from the
-
View all files
|
|
| simpareto(M, N, alpha)
|
function [sample] = simpareto(M, N, alpha)
% SIMPARETO random numbers from Pareto distribution:
% pdf f(x)=alpha/(1+x)^(1+alpha), x>0
% cdf F(x)=1-1/(1+x)^alpha, x>0
% inverse cdf G(y)=(1-y)^(-1/alpha)-1, 0<y<1
%
% [sample] = simpareto(M, N, alpha)
%
% Inputs:
% M - number of rows in the output matrix
% N - number of columns in the output matrix
% alpha - parameter of the distribution. Should be
% positive.
%
% Outputs:
% sample - a matrix of random numbers
%
% See also SIMBINOM, SIMDISCR, SIMEXP, SIMGEOM
% Authors: R.Gaigalas, I.Kaj
% v1.3 04-Oct-02
% Modified 02-Dec-05 to generate a matrix
% check arguments
if (alpha <= 0)
error('alpha negative or zero');
end
% generate a uniform sample and apply the inverse cdf
sample = (1-rand(M, N)).^(-1/alpha)-1;
|
|
Contact us at files@mathworks.com