Main Content

disp

Display geographic or planar vector

Syntax

Description

example

disp(v) prints the size of the geographic or planar vector v, and its properties and dynamic properties, if they exist.

If the command window is large enough, the values of the properties are also shown, otherwise only their size is shown. You can control the display of the numerical values using the format command.

Examples

collapse all

Create a geoshape vector.

gs = geoshape(shaperead('worldcities.shp', 'UseGeoCoords', true));

Display the entire geoshape vector.

disp(gs)
 318x1 geoshape vector with properties:

 Collection properties:
     Geometry: 'point'
     Metadata: [1x1 struct]
 Vertex properties:
  (318 features concatenated with 317 delimiters)
     Latitude: [5.2985 NaN 24.6525 NaN 5.6106 NaN 37.0613 NaN 9.0235 NaN ... ]
    Longitude: [-3.9509 NaN 54.7589 NaN -0.2121 NaN 35.3894 NaN 38.7575 ... ]
 Feature properties:
         Name: {1x318 cell}

Display only the first two feature of the geoshape vector. Notice that the property values are shown because they are short enough to fit on the command window.

disp(gs(1:2));
 2x1 geoshape vector with properties:

 Collection properties:
     Geometry: 'point'
     Metadata: [1x1 struct]
 Vertex properties:
  (2 features concatenated with 1 delimiter)
     Latitude: [5.2985 NaN 24.6525]
    Longitude: [-3.9509 NaN 54.7589]
 Feature properties:
         Name: {'Abidjan'  'Abu Dhabi'}

Input Arguments

collapse all

Geographic or planar vector to be displayed, specified as a geopoint, geoshape, mappoint, or mapshape object.

Introduced in R2012a