From: Dushyant on
My problem is:
I am not able to make "lsqlin" run till lower value of "resnorm" is obtained (from 10^-5 to say 10^-8).

I think that I am not able to set the options.
From: Alan Weiss on
On 5/25/2010 3:28 PM, Dushyant wrote:
> Any Response ...
> My problem is:
> I am not able to make "lsqlin" run till lower value of "resnorm" is
> obtained (from 10^-5 to say 10^-8).
>
> I think that I am not able to set the options.

Can you post some output? Why did lsqlin stop? You don't have many
options to set, but there are some possibilities. For example, you can
set TolFun to 10*eps, instead of the default 100*eps, but this might not
help, depending on the reason lsqlin stopped.

Alan Weiss
MATLAB mathematical toolbox documentation
From: Dushyant Kumar on
Alan Weiss <aweiss(a)mathworks.com> wrote in message <htj3l1$4mb$1(a)fred.mathworks.com>...
> On 5/25/2010 3:28 PM, Dushyant wrote:
> > Any Response ...
> > My problem is:
> > I am not able to make "lsqlin" run till lower value of "resnorm" is
> > obtained (from 10^-5 to say 10^-8).
> >
> > I think that I am not able to set the options.
>
> Can you post some output? Why did lsqlin stop? You don't have many
> options to set, but there are some possibilities. For example, you can
> set TolFun to 10*eps, instead of the default 100*eps, but this might not
> help, depending on the reason lsqlin stopped.
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

Thanks Alan for responding to my message..
This is the return message..

resnorm =

1.3057e-007


exitflag =

3

Also, the code is located at:
http://docs.google.com/leaf?id=0B0Ah9soYnrlIN2MzN2QyNDctYWVmYy00OWE4LWI2ZTUtMDZkMTRmYTBjZDRi&hl=en

Once downloaded, you can call:
[x2_3D,residual, resnorm,exitflag] = Test_LSQNONNEG_n_SpatialReg()

Dushyant
From: Dushyant Kumar on
Also, can someone tell me how can I control resnorm by changing in tolfun?
From: Alan Weiss on
On 5/26/2010 11:43 AM, Dushyant Kumar wrote:
> Alan Weiss <aweiss(a)mathworks.com> wrote in message
> <htj3l1$4mb$1(a)fred.mathworks.com>...
>> On 5/25/2010 3:28 PM, Dushyant wrote:
>> > Any Response ...
>> > My problem is:
>> > I am not able to make "lsqlin" run till lower value of "resnorm" is
>> > obtained (from 10^-5 to say 10^-8).
>> >
>> > I think that I am not able to set the options.
>>
>> Can you post some output? Why did lsqlin stop? You don't have many
>> options to set, but there are some possibilities. For example, you can
>> set TolFun to 10*eps, instead of the default 100*eps, but this might
>> not help, depending on the reason lsqlin stopped.
>>
>> Alan Weiss
>> MATLAB mathematical toolbox documentation
>
> Thanks Alan for responding to my message..
> This is the return message..
>
> resnorm =
>
> 1.3057e-007
>
>
> exitflag =
>
> 3
>
> Also, the code is located at:
> http://docs.google.com/leaf?id=0B0Ah9soYnrlIN2MzN2QyNDctYWVmYy00OWE4LWI2ZTUtMDZkMTRmYTBjZDRi&hl=en
>
>
> Once downloaded, you can call:
> [x2_3D,residual, resnorm,exitflag] = Test_LSQNONNEG_n_SpatialReg()
>
> Dushyant

Exitflag 3 means "Change in the residual was smaller than the specified
tolerance." So you could try setting TolFun to 10*eps, as I suggested
above. You could even set it a little smaller, but don't set it less
than eps.

Did you misname your tes function above, or did you really use lsqnonneg
instead of lsqlin?

Alan Weiss
MATLAB mathematical toolbox documentation