Your problem is that you are using options in the place where fmincon expects to see nonlinear constraints. In other words, your call should be
[x,fval,exitflag,output]=fmincon(@optim,x0,A,B,Aeq,beq,lb,ub,[],options);
But wait, there's more. You should NOT use A and B to set bounds. And you have lb and ub that do not make sense to me, because you say that your only constraints are x(i) > 0 and x(1) < 0.00125. So get rid of A, B, nonlcon, and set
lb = [0,0];
ub = [0.00125,Inf];
[x,fval,exitflag,output]=fmincon(@optim,x0,[],[],[],[],lb,ub,[],options);
Alan Weiss
MATLAB mathematical toolbox documentation
Best Answer