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_pdf(x, a, b)
% uquad_pdf.m - evaluates U-Quadratic Probability Density.
%   See "U-quadratic distribution", Wikipedia.
%
%  Created by Jim Huntley,  08/22/11
%

function [pdf] = uquad_pdf(x, a, b)

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

return

Contact us