length

Class: geoshape

Number of elements in geoshape vector

Syntax

N = length(s)

Description

N = length(s) returns the number of elements contained in the geoshape vector, s. The result is equivalent to size(s,1).

Input Arguments

s

geoshape vector.

Output Arguments

N

Length of the geoshape vector, s.

Examples

expand all

Find the Length of the geoshape vector

Create a geoshape vector and check if properties exist.

coast = load('coast');
s = geoshape(coast.lat, coast.long);
length(s)
length(coast.lat)
ans =

     1


ans =

        9865

See Also

Was this topic helpful?