size
Return size of geographic or planar vector
Description
Examples
Find the Size of a Mapshape Vector
Create a mapshape vector from a structArray
.
structArray = shaperead('worldrivers.shp');
ms = mapshape(structArray)
ms = 128x1 mapshape vector with properties: Collection properties: Geometry: 'line' Metadata: [1x1 struct] Vertex properties: (128 features concatenated with 127 delimiters) X: [126.7796 126.5321 126.3121 126.2383 126.0362 NaN NaN 126.0362 ... ] Y: [73.4571 73.0669 72.8343 72.6010 72.2894 NaN NaN 72.2894 72.3784 ... ] Feature properties: Name: {1x128 cell}
Get the size of the mapshape vector.
sz = size(ms)
sz = 1×2
128 1
Input Arguments
dim
— Dimension to measure length
positive integer scalar
Dimension to measure length of vector v
, specified as
a positive integer scalar.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
Output Arguments
sz
— Size of geographic or planar vector
nonnegative integer scalar or two-element vector
m
— Size of vector in first dimension
nonnegative integer scalar
Size of vector v
in the first dimension, returned as
a nonnegative integer scalar. m
is
length(v)
.
Data Types: double
n
— Size of vector in second dimension
1
Size of vector v
in the second dimension, returned as
the value 1.
Data Types: double
Version History
Introduced in R2012a
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
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)