height
Description
Examples
Obtain Height of Ground Surface
Create a tracking scenario object.
scene = trackingScenario;
Specify the terrain as magic(4)
and define the boundary of the terrain as a square.
terrain = magic(4)
terrain = 4×4
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
boundary = [0 100; 0 100];
Create the ground surface and add it to the scenario.
surface = groundSurface(scene,Terrain=terrain,Boundary=boundary)
surface = GroundSurface with properties: Terrain: [4x4 double] ReferenceHeight: 0 Boundary: [2x2 double]
Get the heights of the surface at the center and its four corners.
h0 = height(surface,[50 50]')
h0 = 8.5000
h1 = height(surface,[0 0]')
h1 = 16
h2 = height(surface,[100 0]')
h2 = 13
h3 = height(surface,[0 100]')
h3 = 4
h4 = height(surface,[100 100]')
h4 = 1
Input Arguments
surface
— Ground surface
GroundSurface
object
Ground surface, specified as a GroundSurface
object.
positions
— Positions of surface to query
2-by-N matrix of real values | 3-by-N matrix of real values
Positions of the surface to query, specified as a 2-by-N matrix of real values or a 3-by-N matrix of real values, where N is the number of positions.
If the IsEarthCentered
property of the tracking scenario is
specified as:
false
— Each column of a 2-by-N matrix represents the x- and y-coordinates of a position in meters. Each column of a 3-by-N matrix represents the x-, y-, and z-coordinates of a position in meters. Note that the z-coordinate is irrelevant for surface height querying.true
— Each column of the 2-by-N matrix represents the latitude and longitude of a position in degrees, in the geodetic frame. Each column of the 3-by-N matrix represents the latitude in degrees, longitude in degrees, and altitude in degrees of a position, in the geodetic frame. Note that the altitude is irrelevant for surface height querying.
Output Arguments
h
— Heights of queried positions
N-element vector of real values
Heights of queried positions, returned as an N-element vector of real values in meters, where N is the number of queried positions.
Version History
Introduced in R2022a
See Also
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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)