MATLAB Function Reference Previous page   Next Page

Discrete Laplacian



If the matrix U is regarded as a function evaluated at the point on a square grid, then 4*del2(U) is a finite difference approximation of Laplace's differential operator applied to , that is:


in the interior. On the edges, the same formula is applied to a cubic extrapolation.

For functions of more variables , del2(U) is an approximation,

where is the number of variables in .


L = del2(U) where U is a rectangular array is a discrete approximation of

The matrix L is the same size as U with each element equal to the difference between an element of U and the average of its four neighbors.

-L = del2(U) when U is an multidimensional array, returns an approximation of

where is ndims(u).

L = del2(U,h) where H is a scalar uses H as the spacing between points in each direction (h=1 by default).

L = del2(U,hx,hy) when U is a rectangular array, uses the spacing specified by hx and hy. If hx is a scalar, it gives the spacing between points in the x-direction. If hx is a vector, it must be of length size(u,2) and specifies the x-coordinates of the points. Similarly, if hy is a scalar, it gives the spacing between points in the y-direction. If hy is a vector, it must be of length size(u,1) and specifies the y-coordinates of the points.

L = del2(U,hx,hy,hz,...) where U is multidimensional uses the spacing given by hx, hy, hz, ...


The function


For this function, 4*del2(U) is also 4.

See Also

diff, gradient

Previous page  deconv delaunay Next page

© 1994-2005 The MathWorks, Inc.