Discrete Laplacian
returns
a discrete approximation of Laplace’s differential
operator applied to L
= del2(U
)U
using the default
spacing, h = 1
, between all points.
specifies the spacing L
= del2(U
,hx,hy,...,hN
)hx,hy,...,hN
between points in each
dimension of U
. Specify each spacing input as a scalar or a
vector of coordinates. The number of spacing inputs must equal the number of
dimensions in U
.
The first spacing value hx
specifies the
x-spacing (as a scalar) or
x-coordinates (as a vector) of the points. If it is a
vector, its length must be equal to size(U,2)
.
The second spacing value hy
specifies the
y-spacing (as a scalar) or
y-coordinates (as a vector) of the points. If it is a
vector, its length must be equal to size(U,1)
.
All other spacing values specify the spacing (as scalars) or
coordinates (as vectors) of the points in the corresponding dimension in
U
. If, for n > 2
, the
n
th spacing input is a vector, then its length
must be equal to size(U,n)
.
If the input U
is a matrix, the interior
points of L
are found by taking the difference
between a point in U
and the average of its four
neighbors:
Then, del2
calculates the values on the edges
of L
by linearly extrapolating the second differences
from the interior. This formula is extended for multidimensional U
.