height
Description
returns the height hgt = height(surface,pt)hgt of the point pt on the
surface. This syntax applies when the surface is a LandSurface,
SeaSurface, or
CustomSurface
object.
returns the height hgt = height(surface,pt,t)hgt of the point pt on the
surface at the time t. This syntax only applies
when the surface is a SeaSurface
object.
Examples
Create a square sea surface area using the seaSurface object. Assume a moderate sea state with a wind speed of about 10 m/s, a fetch of 250 km and a length of 1.0 km. Add an Elfouhaily spectrum to the sea surface. Use the height function to determine the heights of 2 points on the map.
Create a radar scenario.
scene = radarScenario(IsEarthCentered = false);
rng('default')Add a sea surface to the scene with an Elfouhaily spectrum.
spec = seaSpectrum(Resolution = 20);
srf = seaSurface(scene,Boundary = [-500 500; -500 500], ...
WindSpeed = 10,Fetch = 250000,SpectralModel = spec);Find the height at two points.
P1 = [0;0]; P2 = [30;-70]; H = height(srf,[P1 P2])
H = 1×2
-0.9394 -0.2682
Display the sea surface properties in the surface manager.
mgr = scene.SurfaceManager
mgr =
SurfaceManager with properties:
EnableMultipath: 0
UseOcclusion: 1
Surfaces: [1×1 radar.scenario.SeaSurface]
mgr.Surfaces
ans =
SeaSurface with properties:
WindSpeed: 10
WindDirection: 0
Fetch: 250000
SpectralModel: [1×1 seaSpectrum]
RadarReflectivity: [1×1 surfaceReflectivitySea]
ReflectionCoefficient: [1×1 radar.scenario.SurfaceReflectionCoefficient]
ReflectivityMap: 1
ReferenceHeight: 0
Boundary: [2×2 double]
Create a radar scenario. Add a 400-by-400 m area to the scenario with two simulated hills. Find the height of two points.
scene = radarScenario('IsEarthCentered',false); bnds = [-200 200; -200, 200]; x = -200:200; y = -200:200; [X,Y] = meshgrid(x,y); htmap = 20*exp(-X.^2/2000 - Y.^2/2000) + 10*exp(-(X-70).^2/2000 - (Y+100).^2/2000); surf(X,Y,htmap) shading interp

Find the height of the surface at two points.
P1 = [0.0; 0.0]; % Point 1 P2 = [28.0; -40.0]; % Point 2 srf = landSurface(scene,'Terrain',htmap,'Boundary',bnds)
srf =
LandSurface with properties:
RadarReflectivity: [1×1 surfaceReflectivityLand]
ReflectionCoefficient: [1×1 radar.scenario.SurfaceReflectionCoefficient]
ReflectivityMap: 1
ReferenceHeight: 0
Boundary: [2×2 double]
Terrain: [401×401 double]
H = height(srf,[P1 P2])
H = 1×2
20.0058 6.7565
Use the surface manager find the surfaces in the scenario.
mgr = scene.SurfaceManager
mgr =
SurfaceManager with properties:
EnableMultipath: 0
UseOcclusion: 1
Surfaces: [1×1 radar.scenario.LandSurface]
mgr.Surfaces
ans =
LandSurface with properties:
RadarReflectivity: [1×1 surfaceReflectivityLand]
ReflectionCoefficient: [1×1 radar.scenario.SurfaceReflectionCoefficient]
ReflectivityMap: 1
ReferenceHeight: 0
Boundary: [2×2 double]
Terrain: [401×401 double]
Input Arguments
Surface, specified as a LandSurface,
SeaSurface, or
CustomSurface
object.
Points on surface, specified as 2-by-N matrix of real values or a 3-by-N matrix of real values, where N is the number of points.
The coordinate system of the point depends on the value of the
IsEarthCentered property of the radar scenario object::
false— Each column of the 2-by-N matrix represents the x- and y-coordinates of points in meters. Each column of the 3-by-N matrix represents the x-, y-, and z-coordinates in meters. Note that the z-coordinate is irrelevant for surface height querying.true— Each column of the 2-by-N matrix is the latitude in degrees and longitude in degrees, in the geodetic frame. Each column of the 3-by-N matrix is the latitude in degrees, longitude in degrees, and altitude in degrees, in geodetic coordinates. Note that the latitude is irrelevant for surface height querying.
Simulation time, specified as a scalar.
Dependencies
To enable this argument, select surface as a SeaSurface
object.
Data Types: double
Output Arguments
Height of point, returned as a scalar or an N-element vector of real values, where N is the number of queried positions. Units are in meters.
Version History
Introduced in R2022a
See Also
LandSurface | SeaSurface | CustomSurface | occlusion | SurfaceManager
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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)