help-octave
[Top][All Lists]
Advanced

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

Re: Custom jacobian (dfdp) in nonlin_curvefit - calling parameters?


From: Olaf Till
Subject: Re: Custom jacobian (dfdp) in nonlin_curvefit - calling parameters?
Date: Mon, 18 Nov 2019 15:39:37 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Nov 17, 2019 at 10:32:19AM +0100, Pavel Hofman wrote:
> Hi Olaf,
> 
> Dne 17. 11. 19 v 7:52 Olaf Till napsal(a):
> > On Sat, Nov 16, 2019 at 08:24:26PM +0100, Pavel Hofman wrote:
> > > I just wonder how the 2D case should be handled.
> > 
> > The Jacobian function is called with the 'x' reshaped to a column
> > vector (like 'x(:)' would do it). The output should be calculated for
> > this column vector (one row for each element of the column vector and
> > one column for each partial derivative).
> 
> 
> Now I have for f (using the default real finite differences):
> 
> f = @(p, x) ... where x is one row of indeps, and f returns two rows, each
> row for one equation (each equation uses all p elements). This code works
> OK.
> 
> If I wanted to use explicit jacobian to improve precision and calculation
> stability, please how should I handle the two equations in f and dfdp?

Sorry, please forget what I said about the reshaping of 'x', I was
confused... I probably shouldn't try to answer help requests while I'm
working on something different. And I probably don't understand what
you mean with 'the 2D case'.

The Jacobian should just compute one row of partial derivatives for
each element of the result of 'f'.

HTH, Olaf

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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