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

uquad_cdf(x, a, b)
% uquad_cdf.m - evaluates U-Quadratic Cumulative Distribution.
%   See "U-quadratic distribution", Wikipedia.
%
%  Created by Jim Huntley,  08/22/11
%

function [cdf] = uquad_cdf(x, a, b)

alpha = 12 / (b-a)^3;
bet = (b+a) / 2;
cdf = alpha .* ((x-bet).^3+(bet-a)^3) ./ 3;

return

Contact us