isprop

Class: mappoint

Returns true if property exists

Syntax

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

Description

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

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

Input Arguments

p

mappoint vector.

name

String specifying the property of the mappoint vector, p.

names

Cell array of strings specifying the property of the mappoint vector, p.

Output Arguments

tf

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

Examples

expand all

Check if property exists

Create a mappoint vector and check if certain properties exist.

p = mappoint(-33.961, 18.484, 'Name', 'Cape Town');
isprop(p, 'X')
isprop(p, 'Name')
ans =

     1


ans =

     1
Was this topic helpful?