Main Content

size

Size of triangulation connectivity list

Description

sz = size(TR) returns the size of the triangulation connectivity list in the property TR.ConnectivityList. The output sz is a two-element row vector. The first element is the number of triangles or tetrahedra in the triangulation, and the second element is the number of vertices per triangle (three) or tetrahedron (four).

example

Examples

collapse all

Create a 2-D 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];

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

TR = triangulation(C,P)
TR = 
  triangulation with properties:

              Points: [6x2 double]
    ConnectivityList: [4x3 double]

Get the size of the connectivity list. The triangulation has 4 triangles, and each triangle has 3 vertices.

size(TR)
ans = 1×2

     4     3

Input Arguments

collapse all

Triangulation representation, specified as a scalar triangulation or delaunayTriangulation object.

Data Types: triangulation | delaunayTriangulation

Extended Capabilities

Version History

Introduced in R2013a