[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optim: curvefit_stat and fixed parameters
From: |
Olaf Till |
Subject: |
Re: optim: curvefit_stat and fixed parameters |
Date: |
Sat, 31 May 2014 11:34:00 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: Digital signature