[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Irregularly gridded Discrete Laplacian Operator
From: |
David Bateman |
Subject: |
Re: Irregularly gridded Discrete Laplacian Operator |
Date: |
Thu, 19 Jul 2007 12:05:09 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Marco Caliari wrote:
> 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.
No the factor of 2 is implicit in the addition "(dx(1:end-1) +
dx(2:end))" . Try setting dx(i) = dx(i+1) for all i (ie a uniform grid)
and you'll see that the Octave and Matlab definitions are the same.. In
any case in terms of the graph a constant scaling factor makes no
difference :-)
> Better approximations can be obtained by taking a
> larger stencil, see, e.g.,
> http://www.damtp.cam.ac.uk/user/na/PartII/Lect15.pdf
>
Thanks Marco, but as far as I can tell the dx here is always uniform, it
however confirms the correctness of the Octave and Matlab definitions
for uniform grids...
Cheers
David
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary