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

trgenhlog_pdf(x, k, p)
% trgenhlog_pdf.m - evaluates a Truncated Generalized Half Logistic Probability Density.
%   See " Continuous Univariate Distributions", Johnson, Kotz and Balakrishnan,
%   J. Wiley, v.2, p.151, 1995.
%
%   Vector form of PDF!!!
%
%  Created by Jim Huntley,  10/09/07
%

function [pdf] = trgenhlog_pdf(x, k, p)

%persistent coef arg odk

%if(isempty(coef))
    coef = 2 / p;
    odk = 1 / k;
%end

arg = k .* x;
pdf = coef .* (1-arg).^(odk - 1) ./ (1+(1-arg).^odk).^2;

return


Contact us