Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

crommelin_pdf(n, rho, D, nend, c, nq, q)
% crommelin_pdf.m - evaluates a Crommelin Probaility Density Function.
%   See "A Simple Solution for the M/D/c Waiting Time Distribution",
%   G.J. Franx, U. Amsterdam, 16 November, 1998.
%
%  Created by Jim Huntley,  10/26/11.
%

function [pdf] = crommelin_pdf(n, rho, D, nend, c, nq, q)

sn = size(n,2);
cdf = crommelin_cdf(n, rho, D, nend, c, nq, q);
pdf(1) = cdf(1);
pdf(2:sn) = max(diff(cdf),0);

return

Contact us