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

trunpar3_cdf(x, a, ups, L, U)
% trunpar3_cdf.m - evaluates a doubly Truncated Pareto Cumulative Distribution.
%   See "Some Recurrence Relations Between Product Monments of Order Statistics of a Doubly Truncated Pareto Distribution",  
%   http://sankhya.isical.ac.in/search/57b1/57b1001.pdf.
%
%  Created by Jim Huntley,  01/12/10
%

function [cdf] = trunpar3_cdf(x, a, ups, L, U)

%persistent  P Q

%if(isempty(Q))
    P = 1 - (ups/U)^a;
    Q = 1 - (ups/L)^a;
%end

cdf = (1-Q-(ups./x).^a) ./ (P-Q);

return





    

Contact us