No.fmincon() says that A, b, Aeq, and beq must be matrices. Function handles are not allowed for them. Only the objective function and the nonlinear constraint function can be function handles.
The nonlinear constraint routine may be called multiple times before finding a point within bounds to be run through the objective function. However, the optimizer breaks up the problem into multiple sub-problems that it believes / hopes will not violate the nonlinear constraints. Therefore there is not a one-to-one relationship between f(x) and c(x) being called.
If you have an expensive function that must be called by both, then you may wish to implement that function with a "cache". See for examplehttp://www.mathworks.com/matlabcentral/fileexchange/49949-cachedcall . A similar version that saves in memory could also be programmed.
Best Answer