"Bruno" <brunoricola123@gmail.com> wrote in message <mn0e0f$5kj$1@newscl01ah.mathworks.com>...
> "Bruno" <brunoricola123@gmail.com> wrote in message <mn08pj$nq4$1@newscl01ah.mathworks.com>...
> > Sorry... I need to find the fastest way to do it since I need to repeat the calculus for many different M and irr1
>
> I made a huge progress!!
>
> So I am able to set the following:
> f=0;
> m_S>=0;
> irr2 positive;
>
> and use fmincon to find the value of irr2 and m_S.
>
> Now (since I know there are many possible solutions), the last step is ask to maximize irr2...
>
> How can I do this??? fminmax?
OK I FINALLY DID IT WITH A LITTLE TRICK!!!!
So I wrote the objective function as:
f=-x(1)+x(2)-x(2);
An I wrote a nonlinear constraint where I set the f=0
It seems working!
> "Bruno" <brunoricola123@gmail.com> wrote in message <mn08pj$nq4$1@newscl01ah.mathworks.com>...
> > Sorry... I need to find the fastest way to do it since I need to repeat the calculus for many different M and irr1
>
> I made a huge progress!!
>
> So I am able to set the following:
> f=0;
> m_S>=0;
> irr2 positive;
>
> and use fmincon to find the value of irr2 and m_S.
>
> Now (since I know there are many possible solutions), the last step is ask to maximize irr2...
>
> How can I do this??? fminmax?
OK I FINALLY DID IT WITH A LITTLE TRICK!!!!
So I wrote the objective function as:
f=-x(1)+x(2)-x(2);
An I wrote a nonlinear constraint where I set the f=0
It seems working!