help-octave
[Top][All Lists]
Advanced

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

Re: optim: curvefit_stat and fixed parameters


From: Markus Appel
Subject: Re: optim: curvefit_stat and fixed parameters
Date: Sat, 31 May 2014 16:45:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/31/2014 11:34 AM, Olaf Till wrote:
On Fri, May 30, 2014 at 11:42:43PM +0200, Olaf Till wrote:
On Fri, May 30, 2014 at 07:58:00PM +0200, Markus Appel wrote:
Hello,

my goal is to calculate covp and corp for an optimization with
nonlin_curvefit using curvefit_stat. After having some problems I
tried to put together a minimal working example to reproduce the
error (which may be a bug). I am not quite there yet, but
encountered another problem:

The attached script uses nonlin_curvefit and curvefit_stat, one time
with a parameter vector and another time with a parameter struct. I
fit a polynomial with 3 parameters to some data, but added a 4th one
on which the model function does not depend (for demonstration).
Declare the 4th parameter fixed, and curvefit_stat (for parameter
vector) gives:

error: __dfdp__: product: nonconformant arguments (op1 is 4x1, op2 is 3x1)
<snip>

Hello Markus,

that is surely a bug. I'll look into this tomorrow morning ... Olaf

Hopefully fixed now (the bug, not the parameters :-). If you don't
want to install a new changeset of the package, you can just change
line 458 of private/__residmin_stat__.m from

          dfdp (assign (pfin, nonfixed, p), hook)(:, nonfixed);

to

          dfdp (assign (orig_p, nonfixed, p), hook)(:, nonfixed);

.

In the next few days, I'll probably request a new package release.

Thanks for the report.

Olaf


Yes, that also fixed the problem in the "real" optimization scripts, which was probably fallout from that tiny bug.

Thanks for your prompt reply!

Markus



reply via email to

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