octave-maintainers
[Top][All Lists]
Advanced

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

Re: Irregularly gridded Discrete Laplacian Operator


From: Marco Caliari
Subject: Re: Irregularly gridded Discrete Laplacian Operator
Date: Thu, 19 Jul 2007 11:14:29 +0200 (CEST)

On 18/07/07, David Bateman <David.Bateman at motorola.com> wrote:

> whereas the equivalent in Matlab appears to be
>
> D(2:end-1) = ((M(3:end) - M(2:end-1)) ./  dx(2:end) + (M(1:end-2) -
> M(2:end-1)) ./ dx(1:end-1)) ./ (dx(1:end-1) + dx(2:end))

A factor 2 is missing. In any case, it is a first order approximation of
the second derivative. Better approximations can be obtained by taking a
larger stencil, see, e.g.,
http://www.damtp.cam.ac.uk/user/na/PartII/Lect15.pdf

Best regards,

Marco


reply via email to

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