MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
判断地理向量或平面向量是否为空
tf = isempty(v)
tf = isempty(v) 用于判断地理向量或平面向量 v 是否为空。
tf
v
示例
全部折叠
创建一个默认地理点向量。
gp = geopoint()
gp = 0×1 geopoint vector with properties: Collection properties: Geometry: 'point' Metadata: [1×1 struct] Feature properties: Latitude: [] Longitude: []
检查地理坐标向量是否为空。返回值 1 (true) 表示该向量为空。
isempty(gp)
ans = logical 1
创建第二个地理点向量,指定一个地理点。请确认该向量不为空。返回值 0 (false) 表示该向量不为空。
gp2 = geopoint(42.356,-71.101)
gp2 = 1×1 geopoint vector with properties: Collection properties: Geometry: 'point' Metadata: [1×1 struct] Feature properties: Latitude: 42.3560 Longitude: -71.1010
isempty(gp2)
ans = logical 0
geopoint
geoshape
mappoint
mapshape
地理或平面矢量,指定为 geopoint、geoshape、mappoint 或 mapshape 对象。
指示地理向量或平面向量的标志为空,以逻辑标量形式返回。当 v 为空时,tf 即为 True。
True
数据类型: logical
logical
在 R2012a 中推出
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处