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