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

igsr_cdf(x, a, b, c, d, mu)
% igsr_cdf.m - compute Inverted Gamma Square Root Cumulative Distribution Function.
%   See "A Bayesian Analysis of Moving Average Processes with Time-Dependent Parameters", 
%   K. Triantafyllopoulos and G. P. Nason, U. Sheffield, 21 April, 2006.             
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  08/24/06.
%

function [cdf] = igsr_cdf(x, a, b, c, d, mu)

tol = 1e-8;
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(@igsr_pdf,minx,x(jz),tol,trace,a,b,c,d,mu);
end

return



Contact us