del2
Discrete Laplacian
Description
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
hxspecifies 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 tosize(U,2).The second spacing value
hyspecifies 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 tosize(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, forn > 2, thenth spacing input is a vector, then its length must be equal tosize(U,n).
Examples
Input Arguments
Output Arguments
More About
Algorithms
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.
Extended Capabilities
Version History
Introduced before R2006a


