主要内容

本页采用了机器翻译。点击此处可查看英文原文。

disp

显示地理向量或平面向量

语法

说明

disp(v) 会输出地理向量或平面向量 v 的大小,以及其属性(如有)和动态属性。

如果命令行窗口足够大,则还会显示属性的值;否则,仅显示其大小。您可以使用 format 命令控制值的显示。

示例

示例

全部折叠

创建一个几何图形向量。

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

显示整个地理形状向量。

disp(gs)
 318×1 geoshape vector with properties:

 Collection properties:
     Geometry: 'point'
     Metadata: [1×1 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 … ] (1×635 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 … ] (1×635 double)
 Feature properties:
         Name: {1×318 cell}

仅显示地理形状向量的前两个特征。请注意,这些属性值之所以显示出来,是因为它们足够短,可以完全显示在命令行窗口中。

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

 Collection properties:
     Geometry: 'point'
     Metadata: [1×1 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'}

输入参数

全部折叠

待显示的地理或平面向量,指定为 geopointgeoshapemappointmapshape 对象。

版本历史记录

在 R2012a 中推出