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

Remove dynamic property from geopoint vector

Syntax

P = rmfield(P, fieldname)
P = rmfield(P, fields)

Description

P = rmfield(P, fieldname) removes the field specified by the character vector, fieldname , from the geopoint vector, P. The character vector is case-sensitive.

P = rmfield(P, fields) removes all the fields specified by the cell array of character vectors, fields.

    Note:   rmfield cannot remove Latitude, Longitude, and Metadata fields.

Input Arguments

P

geopoint vector.

fieldname

Character vector representing the name of the property. The value is case-sensitive.

fields

Cell array of character vectors specifying the names of the properties. The character vectors are case-sensitive.

Output Arguments

P

Updated geopoint vector with the field(s) removed.

Examples

expand all

Create a geopoint vector and remove a field.

p = geopoint(shaperead('tsunamis', 'UseGeo', true));
p2 = rmfield(p, 'Geometry')
p2 = 

 162x1 geopoint vector with properties:

 Collection properties:
       Geometry: 'point'
       Metadata: [1x1 struct]
 Feature properties:
       Latitude: [1x162 double]
      Longitude: [1x162 double]
           Year: [1x162 double]
          Month: [1x162 double]
            Day: [1x162 double]
           Hour: [1x162 double]
         Minute: [1x162 double]
         Second: [1x162 double]
       Val_Code: [1x162 double]
       Validity: {1x162 cell}
     Cause_Code: [1x162 double]
          Cause: {1x162 cell}
         Eq_Mag: [1x162 double]
        Country: {1x162 cell}
       Location: {1x162 cell}
     Max_Height: [1x162 double]
       Iida_Mag: [1x162 double]
      Intensity: [1x162 double]
     Num_Deaths: [1x162 double]
    Desc_Deaths: [1x162 double]
Was this topic helpful?