This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Gradient of PDE solution

This page describes the legacy workflow. New features might not be compatible with the legacy workflow. For the corresponding step in the recommended workflow, see evaluateGradient.


[ux,uy] = pdegrad(p,t,u)
[ux,uy] = pdegrad(p,t,u,sdl)


[ux,uy] = pdegrad(p,t,u) returns the gradient of u evaluated at the center of each triangle.

Row i from 1 to N of ux contains


Row i from 1 to N of uy contains


There is one column for each triangle in t in both ux and uy.

Although pdegrad returns the value of the gradient at the center of a triangle, the gradient is actually the same everywhere in the triangle interior. This is because pdegrad uses only linear basis functions. The boundaries of triangles are a special case: here the derivatives might be discontinuous.

The geometry of the PDE problem is given by the mesh data p and t. For details on the mesh data representation, see initmesh.

The optional argument sdl restricts the computation to the subdomains in the list sdl.

Introduced before R2006a

Was this topic helpful?