Main Content

disp

Display geographic or planar vector

Syntax

Description

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.

example

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 -34.6645 NaN 12.8767 NaN 22.7778 NaN 31.3044 NaN 36.7870 NaN 43.3620 NaN 31.7444 NaN 31.7744 NaN 52.3699 NaN 61.6040 NaN 39.7831 NaN 41.4673 NaN -18.9141 NaN ... ] (1x635 double)
    Longitude: [-3.9509 NaN 54.7589 NaN -0.2121 NaN 35.3894 NaN 38.7575 NaN 138.8528 NaN 44.5408 NaN 72.2474 NaN 30.4098 NaN 3.0397 NaN 77.0010 NaN 35.9214 NaN 75.0498 NaN 4.8892 NaN -149.1074 NaN 32.9496 NaN 122.8003 NaN 47.5258 NaN ... ] (1x635 double)
 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.

Version History

Introduced in R2012a