23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

del2<br />

2-414<br />

-L = del2(U) when U is an multidimensional array, returns an<br />

approximation of<br />

where N is ndims(u).<br />

Examples The function<br />

L = del2(U,h) where H is a scalar uses H as the spacing between points in each<br />

direction (h=1 by default).<br />

L = del2(U,hx,hy) when U is a rectangular array, uses the spacing specified<br />

by hx and hy. If hx is a scalar, it gives the spacing between points in the<br />

x-direction. If hx is a vector, it must be of length size(u,2) and specifies the<br />

x-coordinates of the points. Similarly, if hy is a scalar, it gives the spacing<br />

between points in the y-direction. If hy is a vector, it must be of length<br />

size(u,1) and specifies the y-coordinates of the points.<br />

L = del2(U,hx,hy,hz,...) where U is multidimensional uses the spacing<br />

given by hx, hy, hz, ...<br />

has<br />

∇ 2 u<br />

----------<br />

2N<br />

uxy ( , ) x2 y2 = +<br />

∇ u 2 =<br />

4<br />

For this function, 4*del2(U) is also 4.<br />

[x,y] = meshgrid(-4:4,-3:3);<br />

U = x.*x+y.*y<br />

U =<br />

25 18 13 10 9 10 13 18 25<br />

20 13 8 5 4 5 8 13 20<br />

17 10 5 2 1 2 5 10 17<br />

16 9 4 1 0 1 4 9 16<br />

17 10 5 2 1 2 5 10 17<br />

20 13 8 5 4 5 8 13 20<br />

25 18 13 10 9 10 13 18 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!