Code covered by the BSD License
-
[ctimes, cval]=linjpcut(jmpti...
LINJPCUT Truncate piecewise linear functions at a given time.
-
[ctimes, cval]=staircut(jmpti...
STAIRCUT Truncate piecewise constant functions at a given time.
-
[ctimes, le_ij, cle_ij, exi, ...
STTIMESCUT Truncate nondecreasing sequences at a given point.
-
countpath(cdir)
COUNTPATH add the counting processes and random number
-
distrmu(distr, dpar)
DISTRMU a table-lookup function. For a given handle to an external
-
distrstat(distr, dpar)
-
onoff(nproc, maxtime, on_dist...
ONOFF generate N independent stationary on-off processes. An
-
rencount(nproc, maxtime, dist...
% RENCOUNT Simulate independent renewal counting processes
-
renewpp(nproc, maxtime, distr...
RENEWPP Generate a matrix of N independent renewal point
-
renrew(nproc, maxtime, ren1_d...
% RENREW Generate N independent renewal reward processes
-
renuni(nproc, maxtime)
RENUNI Generate a matrix of N independent renewal counting
-
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
-
stairintegr(jptimes, fval, st...
% STAIRINTEGR Integrate piecewise constant (stair) functions. The results
-
stairsum(jmptimes, fval)
% STAIRSUM Add piecewise constant (stair) functions.
-
stsumplot(jptimes, fval, stim...
STSUMPLOT Plot piecewise constant functions and their sum. The
-
View all files
|
|
| distrstat(distr, dpar)
|
function [statdist, statpar] = distrstat(distr, dpar)
%
% [statdist, statpar] = distrstat(distr, dpar)
%
% DISTRSTAT a table-lookup function. For a given handle to an
% external random number generator returns a handle to a generator
% from the stationary distribution:
%
% G(t) = 1/mu * int_0^t (1-F(s)) ds
%
% Parameters to both distributions are given in cell-arrays.
%
% Inputs:
% distr - pointer to the external function generating random
% numbers from the desired distribution:
% @rand: uniform in (0,1)
% @simexp: Exp(lambda)
% @simparetonrm: Pareto(alpha, gamma) (see function
% SIMPARETONRM)
% @randn: standard normal
% dpar - a cell array of the distribution parameters
%
% Outputs:
% statdist - the stationary distribution
% statpar - a cell array with the parameters of the stationary
% distribution
%
% See also DISTRMU.
% Author: R.Gaigalas
% v1.0 06-Oct-05
switch func2str(distr)
% switch distr
case 'ones' % degenerate=1 wp1 - counting process
statdist = @ones;
statpar = {};
mu = 1;
case 'rand' % uniform (0,1)
% G(x)=2*x-x^2, 0<=x<=1
statdist = @simlinear;
statpar = {};
case 'simexp' % Exp(lambda)
statdist = @simexp;
statpar = dpar;
case 'simpareto' % Pareto(alpha)
statdist = @simpareto;
statpar = {dpar{1}-1, dpar{2}};
case 'simparetonrm' % Normalized Pareto(alpha, gamma)
statdist = @simparetonrm;
statpar = {dpar{1}-1, dpar{2}};
otherwise
error('Bad parameter <distr>');
return;
end
|
|
Contact us at files@mathworks.com