Code covered by the BSD License  

Highlights from
RanLip Matlab toolbox

from RanLip Matlab toolbox by Gleb Beliakov
Generates random vectors with arbitrary Lipschitz densities in 1-5 variables

example3.m
dim = 1;
Left = [-50];
Right = [50];

ranlip('PrepareHatFunctionAuto',dim, Left, Right, @MyDist2, 10000,8,1);
disp 'computed lipschitz constant ='  
lc = ranlip('Lipschitz')

p = ranlip('RandomVec')
disp 'Generate 50000  random vectors using ranlip("RandomVec",50000)'  

X = ranlip('RandomVec', 50000);
hist(X,40)

Contact us at files@mathworks.com