"leo nidas" <bleonidas25@yahoo.gr> wrote in message <k6s5as$kuu$1@newscl01ah.mathworks.com>...
> I want to minimize a function with respect to some parameters.
> This function is non linear with respect to these parameters.
> I need the maximization to be done under one equality restriction. The restriction is an integral (that involves the parameters of interest) which I want to demand to be equal to specific real value. The integral cannot be solved analytically but always exist.
         
Though I haven't done this, I would think you could enter the integral equality as the 'ceq(x)' equality condition on 'fmincon'. The manual for 'fmincon' states:
"The function nonlcon can be specified as a function handle.
x = fmincon(@myfun,x0,A,b,Aeq,beq,lb,ub,@mycon)
where mycon is a MATLAB function such as
function [c,ceq] = mycon(x)
c = ... % Compute nonlinear inequalities at x.
ceq = ... % Compute nonlinear equalities at x."
Your version of 'mycon' would make an appropriate call on a quadrature function to perform the required integration.
However I would expect such an equality condition would be rather timeconsuming, since every call on the 'ceq(x)' function, of which there should be a great many, would require a complete definite integration using the given parameters and x to be performed, rather than merely evaluating some analytic function.
Roger Stafford
