expr= optimexpr(n)creates an emptyn-by-1OptimizationExpressionarray. Useexpras the initial value in a loop that creates optimization expressions. example expr= optimexpr(cstr)creates an emptyOptimizationExpressionarray that can use the vectorcstrfor indexing. The number of elements ofexpris the sam...
x = optimvar('x'); obj = fcn2optimexpr(@gamma,x); prob = optimproblem('Objective',obj); show(prob) OptimizationProblem : Solve for: x minimize : gamma(x) To solve the resulting problem, give an initial point structure and call solve. Get x0.x = 1/2; sol = solve(prob,x0)...