prob = optimproblem()
prob = optimproblem(name, value)
| Parameter | Description |
|---|---|
| name, value | problem properties such as Objective, Constraints, Description or ObjectiveSense. |
| Parameter | Description |
|---|---|
| prob | optimization problem object. |
optimproblem creates a problem-based model. It can be converted with prob2struct or solved directly for supported unconstrained models.
x = optimvar('x');
prob = optimproblem('Objective', (x - 2)^2);
[sol, fval] = solve(prob)
| Version | Description |
|---|---|
| 2.0.0 | initial version |