Please help with the Inequality

In the following code:
x = lsqlin(C,d,A,b,Aeq,beq,lb,ub,x0,options)
lb and ub are such that lb<=x<=ub.
Is there a way to change it to
lb < x < ub (strict inequalities)
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2013년 3월 15일

0 개 추천

Multiply the values in your lb array by (1+eps) and multiply the values in your ub array by (1-eps)

댓글 수: 4

dav
dav 2013년 3월 15일
thanks. could you please explain what "eps" means?
Is it a small number epsilon ?
dav
dav 2013년 3월 15일
my lb = [ 0 0 ] and ub = [1 1]
so even if I multiply by (1+eps) i still get the same answer !
Can you please suggest something?
Thanks
Walter Roberson
Walter Roberson 2013년 3월 15일
You could use realmin as your lower bound. Unless, that is, it is important to be able to accept the denormalized values as well. If you need the denormalized values too, use eps(realmin) as your lower bound.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

dav
2013년 3월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by