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.

2divergence<br />

Purpose Computes the divergence of a vector field<br />

Syntax div = divergence(X,Y,Z,U,V,W)<br />

div = divergence(U,V,W)<br />

div = divergence(X,Y,U,V)<br />

div = divergence(U,V)<br />

divergence<br />

Description div = divergence(X,Y,Z,U,V,W) computes the divergence of a 3-D vector<br />

field U, V, W. The arrays X, Y, Z define the coordinates for U, V, W and must be<br />

monotonic and 3-D plaid (as if produced by meshgrid).<br />

div = divergence(U,V,W) assumes X, Y, and Z are determined by the<br />

expression:<br />

[X Y Z] = meshgrid(1:n,1:m,1:p)<br />

where [m,n,p] = size(U).<br />

div = divergence(X,Y,U,V) computes the divergence of a 2-D vector field U,<br />

V. The arrays X, Y define the coordinates for U, V and must be monotonic and<br />

2-D plaid (as if produced by meshgrid).<br />

div = divergence(U,V) assumes X and Y are determined by the expression:<br />

[X Y] = meshgrid(1:n,1:m)<br />

where [m,n] = size(U).<br />

Examples This example displays the divergence of vector volume data as slice planes<br />

using color to indicate divergence.<br />

load wind<br />

div = divergence(x,y,z,u,v,w);<br />

slice(x,y,z,div,[90 134],[59],[0]);<br />

shading interp<br />

daspect([1 1 1])<br />

camlight<br />

2-451

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

Saved successfully!

Ooh no, something went wrong!