[X,Y,Z]
= aer2ecef(az,elev,slantRange,lat0,lon0,h0,spheroid) returns
Earth-Centered Earth-Fixed (ECEF) spheroid-centric Cartesian coordinates
corresponding to coordinates az, elev, slantRange in
a local spherical system having the same origin. Any of the first
six numerical input arguments can be scalar, even when the others
are nonscalar; but all nonscalar numeric arguments must match in size.

[___] = aer2ecef(___,angleUnit) adds angleUnit which
specifies the units of inputs az, elev, lat0,
and lon0.

Azimuth angles in the local spherical system, specified as a
scalar, vector, matrix, or N-D array. Azimuths are measured clockwise
from north. Values must be in units that match the input argument angleUnit,
if supplied, and in degrees, otherwise.

Elevation angles in the local spherical system, specified as
a scalar, vector, matrix, or N-D array. Elevations are with respect
to a plane perpendicular to the spheroid surface normal. Values must
be in units that match the input argument angleUnit,
if supplied, and in degrees, otherwise.

Distances from origin in the local spherical system, returned
as a scalar, vector, matrix, or N-D array. The straight-line, 3-D
Cartesian distance is used. Units are determined by the LengthUnit property
of the spheroid input.

Geodetic latitude of local origin (reference) point(s), specified
as a scalar value, vector, matrix, or N-D array. In many cases there
is one origin (reference) point, and the value of lat0 is
scalar, but it need not be. (It may refer to a moving platform, for
example). Values must be in units that match the input argument angleUnit,
if supplied, and in degrees, otherwise.

Longitude of local origin (reference) point(s), specified as
a scalar value, vector, matrix, or N-D array. In many cases there
is one origin (reference) point, and the value of lon0 is
scalar, but it need not be. (It may refer to a moving platform, for
example). Values must be in units that match the input argument angleUnit,
if supplied, and in degrees, otherwise.

Ellipsoidal height of local origin (reference) point(s), specified
as a scalar value, vector, matrix, or N-D array. In many cases there
is one origin (reference) point, and the value of h0 is
scalar, but it need not be. (It may refer to a moving platform, for
example). Units are determined by the LengthUnit property
of the spheroid input.

x-coordinates of one or more points in the spheroid-centric
ECEF system, specified as a scalar value, vector, matrix, or N-D array.
Values must be in units that match the LengthUnit property
of the spheroid object.

y-coordinates of one or more points in the spheroid-centric
ECEF system, specified as a scalar value, vector, matrix, or N-D array.
Values must be in units that match the LengthUnit property
of the spheroid object.

z-coordinates of one or more points in the spheroid-centric
ECEF system, specified as a scalar value, vector, matrix, or N-D array.
Values must be in units that match the LengthUnit property
of the spheroid object.