Documentation Center

  • Trial Software
  • Product Updates

struct

Class: mapshape

Convert mapshape vector to scalar structure

Syntax

structArray = struct(s)

Description

structArray = struct(s) converts the mapshape vector, s, to a scalar structure array, structArray.

Input Arguments

s

mapshape vector.

Output Arguments

structArray

Scalar structure of the mapshape vector s.

Examples

expand all

Convert a mapshape vector into struct

Create a mapshape vector and then convert it into a struct.

structArray = shaperead('worldcities')
s= mapshape(structArray);
structArray2 = struct(s)
structArray = 

318x1 struct array with fields:
    Geometry
    X
    Y
    Name


structArray2 = 

    Geometry: 'point'
    Metadata: [1x1 struct]
           X: [1x635 double]
           Y: [1x635 double]
        Name: {1x318 cell}

See Also

Was this topic helpful?