help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leasqr broken] conflict with ss.m


From: Paul Kienzle
Subject: Re: [leasqr broken] conflict with ss.m
Date: Sun, 29 May 2005 22:47:46 -0400

Martijn,

Sorry for the delay.

Looking at the leasqr code, ss might be uninitialized if you started your search at the solution since ss is only calculated if there is a non-miniscule change.

A possible fix is to put

        ss=sbest;

at line 186, as the first statement in "for iter=1:niter".

This would remove the symptom, but I am still worried about the underlying problem which is why the code after the loop is looking at the last ss that happened to be calculated in the loop rather than looking at something like sbest.

Anyone familiar with the details of Levenburg-Marquardt care to comment?

Thanks,

        - Paul

On Apr 29, 2005, at 10:01 AM, Martijn Brouwer wrote:

Hi,
I have program that performs a least squares optimisation using leasqr.m. I used to run fine, but now it is broken. When I run it I get this output:

Change in parameter(s): 1 2 were constrained
Change in parameter(s): 1 2 were constrained
Change in parameter(s): 1 2 were constrained
Change in parameter(s): 1 2 were constrained
Change in parameter(s): 1 2 were constrained
usage: retsys = ss  (a,b,c{,d,tsam,n,nz,stname,inname,outname,outlist})
error: evaluating if command near line 192, column 3
error: called from `ss' in file `/usr/share/octave/2.1.69/m/control/system/ss.m'
error: evaluating binary operator `<' near line 248, column 8
error: if: error evaluating conditional expression
error: evaluating if command near line 248, column 3
error: evaluating for command near line 186, column 1
error: called from `leasqr' in file `/usr/share/octave/site/m/octave-forge/optim/leasqr.m


I don't think the messages concerning the constraints are a problem.
the problem is indicated by the line:
usage: retsys = ss  (a,b,c{,d,tsam,n,nz,stname,inname,outname,outlist})

According to comments in  leasqr.m ss should be a variable

% ss=scalar sum of squares=sum((wt.*(y-f))^2).

Apparently, this variable is not defined. Octave tries to call ss.m instead, which results in the message. So leasqr.m seams to be broken somewhere.

Strangely, leasqrdemo.m and a small test program written by myself work correctly.

I hope somebody can help me locating the problem.

Martijn Brouwer





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]