To compute the area of the triangles from a triangulation representation specified by an object of TriRep class, you can use the POLYAREA function in MATLAB:
returns the area of the polygon specified by the vertices in the vectors X and Y.
To compute the area of the first triangle from TR execute the following in the MATLAB command prompt:
ind1=TR.Triangulation(1,:);
tri1=TR.X(ind1,:);
A = polyarea(tri1(:,1),tri1(:,2))
For more information about the POLYAREA function, please refer to the documentation by executing the following in the MATLAB command prompt:
Best Answer