Effacer les filtres
Effacer les filtres

Please help with the Inequality

1 vue (au cours des 30 derniers jours)
dav
dav le 15 Mar 2013
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 commentaire
Walter Roberson
Walter Roberson le 15 Mar 2013
Please read the guide to tags and retag this question; see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 15 Mar 2013
Multiply the values in your lb array by (1+eps) and multiply the values in your ub array by (1-eps)
  4 commentaires
dav
dav le 15 Mar 2013
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 le 15 Mar 2013
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by