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

Can the objective function and constraints be represented as matrices similar to the linear programming solver?

 採用された回答

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