Is it possible to represent objective function and constraints as matrices while using optimization tool box

 채택된 답변

linprog() and intlinprog() and quadprog() and lsqlin() and lsqnonneg() are part of the Optimization Toolbox.
However, fminsearch(), fgoalattain(), fmincon(). fminunc(), fseminf(), lsqcurvefit(), lsqnonlin(), fsolve() and fzero() do not accept expressing the function in terms of matrices.
You can write a small anonymous function such as
residue = @(x) sum((M*x(:)).^2)

추가 답변 (0개)

카테고리

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by