FUNCTION REFERENCE
pde.StationaryResults.evaluateGradient
Evaluate the spatial gradient of a stationary PDE solution at query coordinates.
Evaluate the spatial gradient of a stationary PDE solution at query coordinates.
Syntax
[gradx, grady] = evaluateGradient(results, xq, yq)Syntax
[gradx, grady] = evaluateGradient(results, xq, yq, equationIndex)Computes partial derivatives du/dx and du/dy of results at points (xq, yq).
Example
m = createpde; geometryFromEdges(m, decsg([3;4;0;1;1;0;0;0;1;1])); generateMesh(m, 'Hmax', 0.5); specifyCoefficients(m, 'm', 0, 'd', 0, 'c', 1, 'a', 0, 'f', 1); applyBoundaryCondition(m, 'dirichlet', 'Edge', 1:4, 'u', 0); r = solvepde(m); [gx, gy] = evaluateGradient(r, 0.25, 0.25); isfinite(gx) && isfinite(gy) % trueDifferences from MATLAB: Call as evaluateGradient(results, ...); dot-call syntax is not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.