Create optimization problem structure
problem = createOptimProblem('solverName')
problem = createOptimProblem('solverName','ParameterName',ParameterValue,...)
problem = createOptimProblem('solverName')
creates
an empty optimization problem structure for the solverName
solver.
problem = createOptimProblem('solverName','ParameterName',ParameterValue,...)
accepts
one or more commaseparated parameter name/value pairs. Specify ParameterName
inside
single quotes.

Name of the solver. For a 

Matrix for linear equality constraints. The constraints have the form:


Matrix for linear inequality constraints. The constraints have the form:


Vector for linear equality constraints. The constraints have the form:


Vector for linear inequality constraints. The constraints have the form:


Vector of lower bounds.


Function handle to the nonlinear constraint function. The constraint
function must accept a vector If the For more information, see Write Constraints. 

Function handle to the objective function. For all solvers except For more information, see Compute Objective Functions. 

Optimization options. Create options with 

Vector of upper bounds.


A vector, a potential starting point for the optimization. Gives the dimensionality of the problem.


Vector of data points for 

Vector of data points for 

Optimization problem structure. 
Create a problem structure using Rosenbrock's function as objective
(see Include a Hybrid Function), the interiorpoint
algorithm
for fmincon
, and bounds with absolute value 2
:
anonrosen = @(x)(100*(x(2)  x(1)^2)^2 + (1x(1))^2); opts = optimoptions(@fmincon,'Algorithm','interiorpoint'); problem = createOptimProblem('fmincon','x0',randn(2,1),... 'objective',anonrosen,'lb',[2;2],'ub',[2;2],... 'options',opts);
You can create a problem structure by exporting from the Optimization
app (optimtool
), as described
in Exporting from the Optimization app.