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: geoshape

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 geoshape 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

geoshape vector.

name

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

names

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

Output Arguments

tf

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

Examples

expand all

Create a geoshape vector and check if properties exist.

s = geoshape(-33.961, 18.484, 'Name', 'Cape Town');
isprop(s, 'Latitude')
isprop(s, 'Name')
ans =

     1


ans =

     1

Was this topic helpful?