0001 function nl_opt = prepare_nl_opt_call(obj, x0, lb, ub, options) 0002 if exist('OCTAVE_VERSION') % running Octave 0003 % extract MATLAB style options for fmincon 0004 max_iter = optimget(options, 'MaxIter'); 0005 tol = optimget(options, 'TolFun'); 0006 nl_opt = @() sqp(x0,obj,[],[],lb,ub,max_iter,tol); 0007 else % running matlab 0008 nl_opt = @() fmincon(obj,x0,[],[],[],[],lb,ub,[],options); 0009 end 0010 end