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

rosin_cdf(x,q,D)
% rosin_cdf.m - compute Rosin-Rammler Power Cumulative Distribution Function.
%   See "Particle Size Distribution of Black Liquor Sprays with a High Solids Content 
%   in Recovery Boilers", A. Kankkunen and P. Miikkulainen, IFRF Combustion Journal, 
%   Article No. 200308, December 2003.             
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  08/10/06.
%

function [cdf] = rosin_cdf(x,q,D)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@rosin_pdf,minx,x(jz),tol,trace,q,D);
end

return



Contact us