File Exchange

image thumbnail

Gradient for scattered data

version 1.0 (2.31 KB) by

Compute gradient on triangle faces or their vertices for triangulated data



View License

[dFx,dFy] = TRIGRADIENT(TRI,X,Y,Z) or TRIGRADIENT(TRI,X,Y,Z,'vertex') returns numerical gradients of the function z = F(x,y), dFx = dF/dx and DFy = dF/dy at the vertices of the triangles specified in TRI. dFx and dFy are column vectors having the same number of elements as X,Y, and Z.

[dFx,dFy] = TRIGRADIENT(TRI,X,Y,Z,'face') returns the numerical gradients that are constant over each triangle face. In this case, dFx and dFy are column vectors having M = size(TRI,1) elements.

Comments and Ratings (1)

Roman Voronov

Attempted to access last(6580); index out of bounds because numel(last)=6579.

Error in trigradient (line 74)
   r=tn(first:last(k)); % triangles having k-th vertex

MATLAB Release
MATLAB 7 (R14)
Tags Add Tags

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video