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

vanhout_pdf(n, a, b, pa, pb)
% vanhout_pdf.m - evaluates a Van Houtum Probability Density.
%   See "Van Houtum distribution", Wikipedia.
%
%  Created by Jim Huntley,  08/21/11
%

function [pdf] = vanhout_pdf(n, a, b, pa, pb)

if(n == a)
    pdf = pa;
elseif(n == b)
    pdf = pb;
else
    pdf = (1-pa-pb) / (b-a-1);
end
   
return

Contact us