Documentation Center

  • Trial Software
  • Product Updates

rmfield

Class: mapshape

Remove dynamic property from mapshape vector

Syntax

s = rmfield(s, fieldname)
s = rmfield(s, fields)

Description

s = rmfield(s, fieldname) removes the field specified by the string, fieldname , from the mapshape vector, s.

s = rmfield(s, fields) removes all the fields specified by the cell array, fields.

    Note:   rmfield cannot remove X, Y, Metadata and Geometry fields. The specified string, ‘fieldname, is case sensitive.

Input Arguments

s

mapshape vector.

fieldname

Exact string representing the name of the property.

fields

Cell array of strings specifying the names of the properties.

Output Arguments

s

Updated mapshape vector with the field(s) removed.

Examples

expand all

Remove Fields from a mapshape Vector

Create mapshape vector and remove a field.

s = mapshape(shaperead('tsunamis'));
tf = isfield(s,'Intensity')
s2 = rmfield(s,'Intensity');
tf = isfield(s2,'Intensity')
tf =

     1

tf =

     0

See Also

|

Was this topic helpful?