Example: constr = x + y <= 1 is a single constraint when
x and y are scalar variables.
Example: constr = sum(x) == 1 is an array of constraints when
x is an array of two or more dimensions.
pt — Point to evaluate structure with field names that match the optimization variable
names
Point to evaluate, specified as a structure with field names that match
the optimization variable names, for optimization variables in the
constraint. The size of each field in pt must match the
size of the corresponding optimization variable.
Infeasibility of constraint, returned as a real array. Each zero entry
represents a feasible constraint, and each positive entry represents an
infeasible constraint. The size of infeas is the same as
the size of the constraint constr. For an example of
nonscalar infeas, see Compute Multiple Constraint Violations.
Warning
The problem-based approach does not support complex values in an objective function, nonlinear
equalities, or nonlinear inequalities. If a function calculation has a complex
value, even as an intermediate value, the final result can be incorrect.