Info

This question is closed. Reopen it to edit or answer.

lsqnonlin results getting out of bound. Any solution?

1 view (last 30 days)
Gaurav
Gaurav on 17 Jan 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
I'm using lsqnonlin for function minimization, the syntax being:
[y,resnorm] = lsqnonlin(@solver21,k0,lb,ub,options)
k0 is the desired result which should be positive.
Hence, I've given lower bound lb as a zero matrix. However some of the values of the output matrix k0 are negative. Any explanations/suggestions?
  2 Comments
Matt J
Matt J on 17 Jan 2013
Edited: Matt J on 17 Jan 2013
The output matrix in the code you've shown is "y", not "k0". Perhaps you're looking at the wrong variable :-)
Aside from that, show what options you're using, in particular which algorithm you've selected.
Shashank Prasanna
Shashank Prasanna on 17 Jan 2013
Also to add, k0 is your initial starting point, it would not make sense to provide a starting point which outside you bounds. You are starting with an infeasible point.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!