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

stsp_cdf(x,theta,n)
% stsp_cdf.m - compute Standard Two-Sided Power Cumulative Distribution Function.
%               See "VGAM Family Functions for Univariate Distributions", 
%               Beta Version 0.5-15, T. W. Yee, Univserity of Aukland, 
%               1/06/2004, www.stat.auckland.ac.nz/~yee/VGAM/doc/univar.pdf                 
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  03/19/05.
%

function [cdf] = stsp_cdf(x,theta,n)

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(@stsp_pdf,minx,x(jz),tol,trace,theta,n);
end

return



Contact us