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
Find Height of Sea Surface
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: [1x1 radar.scenario.SeaSurface]
mgr.Surfaces
ans = SeaSurface with properties: WindSpeed: 10 WindDirection: 0 Fetch: 250000 SpectralModel: [1x1 seaSpectrum] RadarReflectivity: [1x1 surfaceReflectivitySea] ReflectionCoefficient: [1x1 radar.scenario.SurfaceReflectionCoefficient] ReflectivityMap: 1 ReferenceHeight: 0 Boundary: [2x2 double]
Find Height of Land Surface
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: [1x1 surfaceReflectivityLand] ReflectionCoefficient: [1x1 radar.scenario.SurfaceReflectionCoefficient] ReflectivityMap: 1 ReferenceHeight: 0 Boundary: [2x2 double] Terrain: [401x401 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: [1x1 radar.scenario.LandSurface]
mgr.Surfaces
ans = LandSurface with properties: RadarReflectivity: [1x1 surfaceReflectivityLand] ReflectionCoefficient: [1x1 radar.scenario.SurfaceReflectionCoefficient] ReflectivityMap: 1 ReferenceHeight: 0 Boundary: [2x2 double] Terrain: [401x401 double]
Input Arguments
surface
— Land, sea, or custom surface
LandSurface
object | SeaSurface
object | CustomSurface
object
Surface, specified as a LandSurface
,
SeaSurface
, or
CustomSurface
object.
pt
— Point on surface
2-by-N matrix of real values | 3-by-N matrix of real values
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.
t
— Simulation time
scalar
Simulation time, specified as a scalar.
Dependencies
To enable this argument, select surface
as a SeaSurface
object.
Data Types: double
Output Arguments
hgt
— Height of surface point
scalar | N-element vector of real values
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.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)