1
$\begingroup$

If I have a linear optimization problem to be solved, is it correct to use the FMINCON SOLVER? If not, why?

$\endgroup$

1 Answer 1

0
$\begingroup$
  • If you have Linear Programming problem you should use linprog().
  • If you have a linear parametric model, you may use Least Squares approach. Then you should use linear system solver. In case of linear constraints you should use lsqlin().

The function fmincon() is designed for general smooth non linear problems.

$\endgroup$
5
  • $\begingroup$ Thank you for the reply, but is it wrong to use fmincon for the linear problems? I actually had a closed form solution for the linear problem. But I just want to try with the fmincon. Is it technically correct to use a nonlinear solver for a linear problem. $\endgroup$
    – Srikanth
    Jul 20 at 12:49
  • $\begingroup$ @Srikanth, It is not efficient but it will get you to the solution. $\endgroup$
    – Royi
    Jul 20 at 12:52
  • $\begingroup$ Because when I tried the fmincon on the linear the solution came out is different from the closed form solution I mean when I plot the freqz they looked completly different so. I am trying to know whether it is correct to use it or not. $\endgroup$
    – Srikanth
    Jul 20 at 12:55
  • $\begingroup$ @Srikanth, If you share the problem we'll be able to analyze it. If it is linear, it should converge to the same value of the objective. $\endgroup$
    – Royi
    Jul 20 at 13:11
  • $\begingroup$ @Srikanth, Could you please review my answer? If it fits you, could you mark it? $\endgroup$
    – Royi
    Aug 20 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.