c = optimconstr()
c = optimconstr(lhs, relation, rhs)
| Parameter | Description |
|---|---|
| lhs, rhs | left and right expressions. |
| relation | constraint relation: <=, == or >=. |
| Parameter | Description |
|---|---|
| c | optimization constraint object. |
optimconstr creates constraints used by optimization problems. Relational operators on expressions also create constraints.
x = optimvar('x');
c = optimconstr(x, '<=', 5)
| Version | Description |
|---|---|
| 2.0.0 | initial version |