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

trungama_pdf(x, alpha, bet, m)
% trungama_pdf.m - evaluates a Truncated Gamma Probability Density.
%   See "A Bayesian Analysis of Moving Average Processes with Time-Dependent Parameters", 
%   K. Triantafyllopoulos and G. P. Nason, U. Sheffield.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  6/22/06
%

function [pdf] = trungama_pdf(x, alpha, bet, m)

%persistent coef

%if(isempty(coef))
    coef = bet^alpha / (gammainc(m*bet,alpha) * gamma(alpha));
%end

pdf = coef .* x.^(alpha-1) .* exp(-bet.*x);

return

Contact us