The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Bug in lsqlin
Replies: 1   Last Post: Mar 15, 2013 9:56 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Alan Weiss

Posts: 1,430
Registered: 11/27/08
Re: Bug in lsqlin
Posted: Mar 15, 2013 9:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/14/2013 5:51 PM, Santosh wrote:
> I have noticed that the residual in
> [X,resnorm,residual,exitflag,output,lambda] =
> lsqlin(C,d,A,b,Aeq,beq,lb,ub,X0,options,varargin)
> is CX-d when no constraints are given and it is d-CX when lower and
> upper bounds are given.
> I am not sure about the cases where equalities and inequality
> constraints are given.
> Matlab version R0212b (
> It would be good to know if this bug exists for other constraints also
> and if someone can do a quickfix.
> --
> Thanks
> Santosh

This indeed seems to be a bug that affects the trust-region-reflective
algorithm for bound-constrained problems only. The problem is under

Meanwhile, you can use the active-set algorithm, which seems to produce
correct results for all constraint types. Enter
options = optimset('LargeScale','off')

Thanks for reporting this problem,

Alan Weiss
MATLAB mathematical toolbox documentation

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.