Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

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 character vector, name, is a property of the mapshape vector, s.

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

Input Arguments

s

mapshape vector.

name

Character vector specifying the property of the mapshape vector, s.

names

Cell array of character vectors specifying the property of the mapshape vector, s.

Output Arguments

tf

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

Examples

expand all

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
Was this topic helpful?