[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## using leasqr with developement version

**From**: |
Carlo de Falco |

**Subject**: |
using leasqr with developement version |

**Date**: |
Tue, 28 Jun 2011 18:06:44 +0200 |

Hi,
I am posting this to both Octave and Octave-Forge as I think this
problem encountered while running a function from the 'optim' package
actually exposes some bug in Octave itself.
If others can confirm this behaviour 'll try to better identify the bug
and report it to the bug tracker.
I'm using the latest developement version of Octave and I am
trying to use leasqr from the optim package to fit some data
but I experience some strange behaviour:
------------------------------------
F = @(x, p) p .* exp (- p .* x);
x = linspace (0, 1, 10);
p0 = .1; p = .2;
[f, p1] = leasqr (x, F(x, p), p0, F)
>*> F = @(x, p) p .* exp (- p .* x);*
>*> x = linspace (0, 1, 10);*
>*> p0 = .1; p = .2;*
>*> [f, p1] = leasqr (x, F(x, p), p0, F)*
error: `m' undefined near line 81 column 16
error: evaluating argument list element number 1
error: called from:
error: /Users/carlo/octave/optim-1.0.16/dfdp.m at line 81, column 7
error: at line -1, column -1
error: /Users/carlo/octave/optim-1.0.16/__lm_svd__.m at line 176, column 9
error: /Users/carlo/octave/optim-1.0.16/leasqr.m at line 583, column 26
error: ?unknown? at line -1, column -1
>*> *
------------------------------------
which is strange for two reasons:
1) there is no line 81 in dfdp.m, I rather believe this refers to line 81 in
__dfdp__.m:
prt = zeros (m, n); % initialise Jacobian to Zero
2) m is defined on line 31 of __dfdp__.m and should not be undefined on line 81
but even more strange, after running leasqr, I get
------------------------------------
>*> x*
error: `x' undefined near line 33 column 1
>*> p*
error: `p' undefined near line 33 column 1
>*> F*
error: `F' undefined near line 33 column 1
>*> whos*
>*> *
------------------------------------
So all variables defined before running leasqr have been cleared!
can anyone confirm this behaviour? Any hints how to debug it?
c.

**using leasqr with developement version**,
*Carlo de Falco* **<=**