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.

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 character vector, 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 character vector, fieldname, is case sensitive.

Input Arguments

s

mapshape vector.

fieldname

Exact string representing the name of the property.

fields

Cell array of character vectors specifying the names of the properties.

Output Arguments

s

Updated mapshape vector with the field(s) removed.

Examples

expand all

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