On 9/22/2013 10:21 AM, El wrote: > Dear all, > > I have to find the values of two different variables sigma_u and > sigma_v which maximize the objective function C(sigma_u,sigma_v) and > fulfil the following constraint: sigma_u+sigma_v=P, where the value of > P is given. I need some help because I don't know how to formulate the > problem. > Thank you in advance
I would eliminate the constraint by setting sigma_v = P - sigma_u Now you have an unconstrained problem in one variable, sigma_u. Write C in terms of sigma_u alone. Then you can use fminbnd to minimize the function -C(sigma_u) (minimize the negative to maximize the function).
Just one more thing: fminbnd needs a bounded region to search. So you will somehow need to come up with a bounded region where the maximum is.
Alan Weiss MATLAB mathematical toolbox documentation