MATLAB: Are the upper and lower bounds violated during iterations with the LSQNONLIN function from the Optimization Toolbox

matlab optimization

I am using lsqnonlin with the trust-region-reflective algorithm and the bounds are violated. Which is the problem?thank you!

Best Answer

Perhaps you didn't write your bounds as complete vector constraints. For example, if you have 15 decision variables and want a lower bound of 0 on each variable, then you have to specify
lb = zeros(15,1);
not
lb = 0;
Alan Weiss
MATLAB mathematical toolbox documentation