Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isfield

Class: mappoint

Returns true if dynamic property exists

Syntax

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

Description

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

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

Input Arguments

p

mappoint vector.

name

Name of the dynamic property.

names

Cell array of names of dynamic properties.

Output Arguments

tf

Boolean. 1 if p contains the specified fields or 0 otherwise.

Examples

expand all

Create mappoint vector and check is a particular fieldname exists in the vector.

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

     0


ans =

     1
Was this topic helpful?