% sampledemo.m
% sample demo for gradient sampling algorithm
% Written by M. Overton (overton@cs.nyu.edu), last revised Feb 2005

pars.m = 2;                  % needed by gradient sampling algorithm
pars.fgname = 'samplefun';   % simple two variable non-Lipschitz sample problem 
[x,f,optcert] = gradsamp(pars, options)  % solve optimization problem   

% see comments in samplefun.m to see why x(2) is not usually reduced as close
% to 0 as x(1) is and why x(2) usually ends up negative

