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

gent_pdf(x, sigma, p, q)
% gent_pdf.m - evaluates a Generalized T Probability Density.
%   See "Generalized T-Distribution and It's Application to Process Data
%   Reconciliation and Process Monitoring", 
%   D. Wang and J. A. Romagnoli, LSU, Trans. Instit.  Meas Cntrl., 27, 5, 2005, p. 367.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  9/18/06
%

function [pdf] = gent_pdf(x, sigma, p, q)


coef = p / (2*sigma*q^(1/p)*beta(1/p,q));
%sx = size(x,2);

pdf = coef ./ (1 + abs(x).^p./(q*sigma^p)).^(q+1/p);
%for jx = 1:sx
%    pdf(jx) = coef * x(jx)^(0.5*(alpha-1)) * besseli(0,nu*sqrt(x(jx))/eta) * ...
%              besselk(alpha-1,2*(sqrt(term*alpha*x(jx)))); 
%end

return

Contact us