struct
Convert geographic or planar vector to scalar structure
Syntax
Description
Examples
Convert a Mappoint Vector into a Structure
Create a mappoint vector.
mp = mappoint(shaperead('tsunamis.shp'))
mp = 162x1 mappoint vector with properties: Collection properties: Geometry: 'point' Metadata: [1x1 struct] Feature properties: X: [128.3000 -156 157.9500 143.8500 -155 -82.4000 159.5000 156.5000 ... ] Y: [-3.8000 19.5000 -9.0200 42.1500 19.1000 43.1000 52.7500 50 ... ] Year: [1950 1951 1951 1952 1952 1952 1952 1953 1953 1953 1953 1954 ... ] Month: [10 8 12 3 3 5 11 3 6 9 11 6 10 4 11 3 6 7 1 4 7 11 11 5 8 8 ... ] Day: [8 21 22 4 17 6 4 18 27 14 25 26 NaN 19 2 9 22 28 19 22 10 6 12 ... ] Hour: [3 10 NaN 1 3 NaN 16 NaN NaN 0 17 NaN NaN 20 NaN 14 23 8 14 ... ] Minute: [23 57 NaN 22 58 NaN 58 NaN NaN 26 48 NaN NaN 24 NaN 22 50 ... ] Second: [NaN NaN NaN 41 NaN NaN NaN NaN NaN 36 NaN NaN NaN NaN NaN ... ] Val_Code: [2 4 2 4 4 1 4 3 3 4 4 1 2 4 3 4 3 4 4 2 4 4 2 4 4 4 4 4 4 ... ] Validity: {1x162 cell} Cause_Code: [1 1 6 1 1 9 1 1 6 3 1 9 0 1 1 1 1 1 1 1 3 1 1 1 0 3 1 1 ... ] Cause: {1x162 cell} Eq_Mag: [7.6000 6.9000 NaN 8.1000 4.5000 NaN 9 5.8000 NaN 6.8000 ... ] Country: {1x162 cell} Location: {1x162 cell} Max_Height: [2.8000 3.6000 6 6.5000 1 1.5200 18 1.5000 1.4000 3 3 3 ... ] Iida_Mag: [1.5000 1.8000 2.6000 2.7000 NaN NaN 4.2000 0.6000 0.5000 ... ] Intensity: [1.5000 NaN NaN 2 NaN NaN 4 NaN 1 1.5000 1.5000 NaN NaN ... ] Num_Deaths: [NaN NaN NaN 33 NaN NaN 2236 NaN NaN NaN NaN 7 NaN 3 NaN ... ] Desc_Deaths: [NaN NaN NaN 1 NaN NaN 3 NaN NaN NaN NaN 1 NaN 1 NaN ... ]
Convert the mappoint vector into a structure.
s = struct(mp)
s = struct with fields:
Geometry: 'point'
Metadata: [1x1 struct]
X: [128.3000 -156 157.9500 143.8500 -155 -82.4000 159.5000 ... ]
Y: [-3.8000 19.5000 -9.0200 42.1500 19.1000 43.1000 ... ]
Year: [1950 1951 1951 1952 1952 1952 1952 1953 1953 1953 1953 ... ]
Month: [10 8 12 3 3 5 11 3 6 9 11 6 10 4 11 3 6 7 1 4 7 11 11 ... ]
Day: [8 21 22 4 17 6 4 18 27 14 25 26 NaN 19 2 9 22 28 19 22 ... ]
Hour: [3 10 NaN 1 3 NaN 16 NaN NaN 0 17 NaN NaN 20 NaN 14 23 ... ]
Minute: [23 57 NaN 22 58 NaN 58 NaN NaN 26 48 NaN NaN 24 NaN 22 ... ]
Second: [NaN NaN NaN 41 NaN NaN NaN NaN NaN 36 NaN NaN NaN NaN ... ]
Val_Code: [2 4 2 4 4 1 4 3 3 4 4 1 2 4 3 4 3 4 4 2 4 4 2 4 4 4 4 ... ]
Validity: {1x162 cell}
Cause_Code: [1 1 6 1 1 9 1 1 6 3 1 9 0 1 1 1 1 1 1 1 3 1 1 1 0 3 1 ... ]
Cause: {1x162 cell}
Eq_Mag: [7.6000 6.9000 NaN 8.1000 4.5000 NaN 9 5.8000 NaN ... ]
Country: {1x162 cell}
Location: {1x162 cell}
Max_Height: [2.8000 3.6000 6 6.5000 1 1.5200 18 1.5000 1.4000 3 3 3 ... ]
Iida_Mag: [1.5000 1.8000 2.6000 2.7000 NaN NaN 4.2000 0.6000 ... ]
Intensity: [1.5000 NaN NaN 2 NaN NaN 4 NaN 1 1.5000 1.5000 NaN NaN ... ]
Num_Deaths: [NaN NaN NaN 33 NaN NaN 2236 NaN NaN NaN NaN 7 NaN 3 ... ]
Desc_Deaths: [NaN NaN NaN 1 NaN NaN 3 NaN NaN NaN NaN 1 NaN 1 NaN ... ]
Input Arguments
Output Arguments
s
— Structure representing a geographic or planar vector
scalar structure
Structure representing a geographic or planar vector, returned as a scalar structure.
Version History
See Also
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)