If I have a linear optimization problem to be solved, is it correct to use the FMINCON SOLVER? If not, why?
1 Answer
- 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.
-
$\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$– SrikanthJul 20 at 12:49
-
$\begingroup$ @Srikanth, It is not efficient but it will get you to the solution. $\endgroup$– RoyiJul 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$– SrikanthJul 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$– RoyiJul 20 at 13:11
-
$\begingroup$ @Srikanth, Could you please review my answer? If it fits you, could you mark it? $\endgroup$– RoyiAug 20 at 13:26