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

fatlife_pdf(x, gam, mu, bet)
% fatlife_pdf.m - evaluates a Fatigue Life Probability Density Function.
%   See Wikipedia, http://en.wikipedia.org/wiki/Birnbaum-Saunders_distribution.
%
%  Created by Jim Huntley,  03/10/04
%

function [pdf] = fatlife_pdf(x, gam, mu, bet)

arg0 = sqrt((x-mu)/bet) + sqrt(bet/(x-mu)); 
arg1 = (sqrt((x-mu)/bet) - sqrt(bet/(x-mu))) / gam;  
pdf = arg0 * gaus_pdf(arg1,0,1) / (2*gam*(x-mu));

return

Contact us