Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

bose_cdf(x,s,mu)
% bose_cdf.m - compute Bose-Einstein Cumulative Distribution Function.
%               See Eric W. Weisstein. "Fermi-Dirac Distribution." 
%               From MathWorld--A Wolfram Web Resource. 
%               http://mathworld.wolfram.com/Bose-EinsteinDistribution.html 
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  03/11/04.
%

function [cdf] = bose_cdf(x,s,mu)

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

minx = min(x);

% Integrate PDF to get CDF.
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@bose_pdf,minx,x(jz),tol,trace,s,mu);
end

return



Contact us