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

modpert_cdf(x, gam, mo, a, b)
% modpert_cdf.m - evaluates a Modified PERT Cumulative Distribution.
%   See "A Compendium of Distributions", ModelRisk 3.0, Vose Software,
%   http://www.vosesoftware.com/content/ebook.pdf.
%
%  Created by Jim Huntley,  08/11/11
%

function [cdf] = modpert_cdf(x, gam, mo, a, b)

%persistent coef a1 a2

%if(isempty(coef))
    a1 = 1 + gam*(mo-a)/(b-a);
    a2 = 1 + gam*(b-mo)/(b-a);
%end

z = (x-a) ./ (b-a);
cdf = betainc(z,a1,a2);
  
return

Contact us