Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

genk_cdf(x,alpha,eta,nu)
% genk_cdf.m - compute Generalized K Cumulative Distribution Function.
%   See "The K-Generalized Model to Generate Marine Feature in SAR Images: First Results", 
%   M. Migliaccio et al., U. di Napoli, Proc. of SEASAR, 2006, 23 Jan., 2006, ESA SP-613, April, 2006.            
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  09/18/06.
%

function [cdf] = genk_cdf(x,alpha,eta,nu)

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(@genk_pdf,minx,x(jz),tol,trace,alpha,eta,nu);
end

return



Contact us