[Top][All Lists]

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

Re: lsqnonlin and nonlin_residmin

From: Olaf Till
Subject: Re: lsqnonlin and nonlin_residmin
Date: Thu, 11 Jun 2015 15:50:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 10, 2015 at 02:15:25AM +0100, Asma Afzal wrote:
> Could you please check the mapping of options in [2] and [3]?

I've made some changes, a patch for lsqnonlin.m is attached. The
changes are untested. I'd rather spare the work to transfer the
changes to lsqcurvefit.m until we think there will be not many further
changes; but if you like to transfer them already now, you can of
course do so. (Another possibility is having lsqcurvefit wrap

Comments to the patch:

- TMW seems to have changed the handling of options for the size of
  the finite differences since I decided not to use the same
  options. Now I think 'FinDiffRelStep' should be used for
  nonlin_residmin also, together with 'TypicalX'. It does not hurt to
  also provide 'FinDiffType' in nonlin_residmin additionally to the
  existing 'diff_onesided', although the latter can be specific to
  single parameters, while 'FinDiffType' is only scalar. Since I'm
  currently busy with other things, give me some days to implement
  these three options and the corresponding code changes in
  __nonlin_residmin__ and __dfdp__.

- Typically no elements of the Jacobian are zero. In other cases it
  can be left to the user to convert it to a sparse matrix
  representation. Converting Jacobians without zero elements with
  'sparse()' increases the size of used memory and the time of later
  arithmetic operations with the Jacobian. (In addition to each
  element, it's location in the matrix must be stored in sparse matrix

- minor changes:

-- The line 'modelfun = varargin{1};' better comes after argument

-- Line continuation with "\" is deprecated, use "...". In many cases
   neither is necessary.



public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: lsqnonlin.m.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature

reply via email to

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