size

Class: triangulation

Size of triangulation connectivity list

Syntax

sz = size(TR)

Description

sz = size(TR) returns the size the triangulation connectivity list.

Input Arguments

TR

Triangulation representation, see triangulation or delaunayTriangulation.

Output Arguments

sz

Size of connectivity list, returned as a two-element row vector. The first element, sz(1) is the number of triangles or tetrahedra in the triangulation, and sz(2) is the number of vertices per triangle or tetrahedron.

Examples

expand all

Size of 2-D Triangulation

Create a triangulation.

P = [ 2.5    8.0
      6.5    8.0
      2.5    5.0
      6.5    5.0
      1.0    6.5
      8.0    6.5];

T = [5  3  1;
     3  2  1;
     3  4  2;
     4  6  2];

TR = triangulation(T,P);

Get the size of the connectivity list.

size(TR)
ans =

     4     3

The triangulation has 4 triangles, and each triangle has 3 vertices.

Was this topic helpful?