View License

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

» Watch video

Highlights from
Gradient for scattered data

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 2.31 KB File ID: #38857 Version: 1.0

Gradient for scattered data



Compute gradient on triangle faces or their vertices for triangulated data

| Watch this File

File Information

[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.

Required Products MATLAB
MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
11 Feb 2013 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

Comment only

Contact us