Documentation Center

  • Trial Software
  • Product Updates

isprop

Class: mapshape

True if property exists

Syntax

tf = isprop(s,name)
tf = isprop(s,names)

Description

tf = isprop(s,name) returns true if the value specified by the string, name is a property of the mapshape vector, s.

tf = isprop(s,names) returns true for each element of the cell array of strings, names, that is a property of s. tf is a logical array the same size as names.

Input Arguments

s

mapshape vector.

name

String specifying the property of the mapshape vector, s.

names

Cell array of strings specifying the property of the mapshape vector, s.

Output Arguments

tf

Boolean. 1 if the property exists with s ,0 otherwise.

Examples

expand all

Check if Property Exists

Create a mapshape vector and check for properties by name.

s = mapshape(-33.961, 18.484, 'Name', 'Cape Town');
isprop(s, 'X')
isprop(s, 'Name')
ans =

     1


ans =

     1

See Also

|

Was this topic helpful?