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

narayana_cdf(n, k)
% narayana_cdf.m - compute Narayana Cumulative Distribution Function.
%   See "q-Narayana Numbers and the Flag h-Vector of J(2 x n)", P. Branden, 11/08/02.
%
%  Created by:  Jim Huntley,  08/02/06.
%

function [cdf] = narayana_cdf(n, k)

sum1 = narayana_pdf(1,k);
for jn = 2:n
    sum1 = sum1 + narayana_pdf(jn, k);
end
cdf = sum1;
    
return



Contact us