rmfield

Class: mappoint

Remove dynamic property from mappoint vector

Syntax

p = rmfield(p, fieldname)
p = rmfield(p, fields)

Description

p = rmfield(p, fieldname) removes the field specified by the string, fieldname , from the mappoint vector, p.

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

    Note:   rmfield cannot remove X, Y and Metadata fields and the string specified is case sensitive.

Input Arguments

p

mappoint vector.

fieldname

Exact string representing the name of the property.

fields

Cell array of strings specifying the names of the properties.

Output Arguments

p

Updated mappoint vector with the field(s) removed.

Examples

expand all

Remove fields from a mappoint vector

Create a mappoint vector and delete a field from it.

p = mappoint(shaperead('tsunamis'));
p2 = rmfield(p, 'Geometry')
p2 = 

 162x1 mappoint vector with properties:

 Collection properties:
       Geometry: 'point'
       Metadata: [1x1 struct]
 Feature properties:
              X: [1x162 double]
              Y: [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?