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_cdf(x,sigma,p,q)
% gent_cdf.m - compute Generalized T Cumulative Distribution Function.
%   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 CDF !!!
%
%  Created by:  Jim Huntley,  09/18/06.
%

function [cdf] = gent_cdf(x,sigma,p,q)

tol = 1e-6;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@gent_pdf,minx,x(jz),tol,trace,sigma,p,q);
end

return



Contact us