isempty
Determine if geographic or planar vector is empty
Syntax
Description
Examples
Check If a Geopoint Vector Is Empty
Create a default geopoint vector.
gp = geopoint()
gp = 0x1 geopoint vector with properties: Collection properties: Geometry: 'point' Metadata: [1x1 struct] Feature properties: Latitude: [] Longitude: []
Check if the geopoint vector is empty. A returned value of 1 (true) indicates the vector is empty.
isempty(gp)
ans = logical
1
Create a second geopoint vector, specifying a geographic point. Confirm that this vector is not empty. A returned value of 0 (false) indicates the vector is not empty.
gp2 = geopoint(42.356,-71.101)
gp2 = 1x1 geopoint vector with properties: Collection properties: Geometry: 'point' Metadata: [1x1 struct] Feature properties: Latitude: 42.3560 Longitude: -71.1010
isempty(gp2)
ans = logical
0
Input Arguments
Output Arguments
tf
— Flag indicating geographic or planar vector is empty
logical scalar
Flag indicating geographic or planar vector is empty, returned as a
logical scalar. tf
is True
when
v
is empty.
Data Types: logical
Version History
Introduced in R2012a
MATLAB Command
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)