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.

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

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