Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
fmincon question

Subject: fmincon question

From: Haemish

Date: 21 Jan, 2013 06:34:08

Message: 1 of 3

Dear sir,

I use fmincon function for a constraint minimization problem.

I have some problems about fmincon and would you mind giving me an answer on it?

When I use fmincon, the function has a form of '[x,fval]=fmincon(@objfun,x0,[],[],[],[],lb,ub,@confun,options)'

And there is an simple example of x0 = 0, lb = 0, ub = 10.

Even thoug I put the lb and ub non-negative, I think that the searching is executed on the area of all (negative ~ 0 ~ positive). And the final answer is found between lb and ub.

But is there any way to find an answer in the domain of definition of lb to ub?

In my real problem, it is essential to find a solution in the limited area (not searching out of that).

Sincerely yours,

Thank you.

Minjae Kim

Subject: fmincon question

From: Alan_Weiss

Date: 21 Jan, 2013 15:55:45

Message: 2 of 3

On 1/21/2013 1:34 AM, Haemish wrote:
> Dear sir,
>
> I use fmincon function for a constraint minimization problem.
>
> I have some problems about fmincon and would you mind giving me an
> answer on it?
>
> When I use fmincon, the function has a form of
> '[x,fval]=fmincon(@objfun,x0,[],[],[],[],lb,ub,@confun,options)'
>
> And there is an simple example of x0 = 0, lb = 0, ub = 10.
>
> Even thoug I put the lb and ub non-negative, I think that the
> searching is executed on the area of all (negative ~ 0 ~ positive).
> And the final answer is found between lb and ub.
>
> But is there any way to find an answer in the domain of definition of
> lb to ub?
> In my real problem, it is essential to find a solution in the limited
> area (not searching out of that).
>
> Sincerely yours,
>
> Thank you.
>
> Minjae Kim

Take a look at the documentation on bound constraints:
http://www.mathworks.com/help/optim/ug/writing-constraints.html#br9p_ry

This shows which algorithms satisfy bounds at all iterations.

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: fmincon question

From: Haemish

Date: 30 Jan, 2013 10:46:07

Message: 3 of 3

Alan_Weiss <aweiss@mathworks.com> wrote in message <kdjoe1$91c$1@newscl01ah.mathworks.com>...
> On 1/21/2013 1:34 AM, Haemish wrote:
> > Dear sir,
> >
> > I use fmincon function for a constraint minimization problem.
> >
> > I have some problems about fmincon and would you mind giving me an
> > answer on it?
> >
> > When I use fmincon, the function has a form of
> > '[x,fval]=fmincon(@objfun,x0,[],[],[],[],lb,ub,@confun,options)'
> >
> > And there is an simple example of x0 = 0, lb = 0, ub = 10.
> >
> > Even thoug I put the lb and ub non-negative, I think that the
> > searching is executed on the area of all (negative ~ 0 ~ positive).
> > And the final answer is found between lb and ub.
> >
> > But is there any way to find an answer in the domain of definition of
> > lb to ub?
> > In my real problem, it is essential to find a solution in the limited
> > area (not searching out of that).
> >
> > Sincerely yours,
> >
> > Thank you.
> >
> > Minjae Kim
>
> Take a look at the documentation on bound constraints:
> http://www.mathworks.com/help/optim/ug/writing-constraints.html#br9p_ry
>
> This shows which algorithms satisfy bounds at all iterations.
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

I've got it. active-set method find the answer in all area in spite of lb and ub. But, sqp or etc... do not!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us