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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2del2<br />

Purpose Discrete Laplacian<br />

Syntax L = del2(U)<br />

L = del2(U,h)<br />

L = del2(U,hx,hy)<br />

L = del2(U,hx,hy,hz,...)<br />

Definition If the matrix U is regarded as a function uxy ( , ) evaluated at the point on a<br />

square grid, then 4*del2(U) is a finite difference approximation of Laplace’s<br />

differential operator applied to u , that is:<br />

l<br />

where:<br />

l ij<br />

∇ 2 u 1<br />

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

4 4<br />

d2u dx 2<br />

--------- d2u dy 2<br />

⎛ ⎞<br />

= = ⎜ + --------- ⎟<br />

⎝ ⎠<br />

1<br />

= -- ( u<br />

4 i + 1, j + ui – 1, j + ui, j + 1 + ui, j – 1)<br />

– ui, in the interior. On the edges, the same formula is applied to a cubic<br />

extrapolation.<br />

For functions of more variables uxyz… ( , , , ) , del2(U) is an approximation,<br />

l<br />

∇ 2 u 1<br />

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

2N 2N<br />

d2u dx 2<br />

--------- d2u dy 2<br />

--------- d2u dz 2<br />

⎛ ⎞<br />

= = ⎜ + + --------- + …⎟<br />

⎝ ⎠<br />

where N is the number of variables in u.<br />

Description L = del2(U) where U is a rectangular array is a discrete approximation of<br />

∇<br />

l<br />

2 u 1<br />

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

4 4<br />

d2u dx 2<br />

--------- d2u dy 2<br />

⎛ ⎞<br />

=<br />

= ⎜ + --------- ⎟<br />

⎝ ⎠<br />

The matrix L is the same size as U with each element equal to the difference<br />

between an element of U and the average of its four neighbors.<br />

del2<br />

2-413

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

Saved successfully!

Ooh no, something went wrong!