[x,y,z] = sph2cart(azimuth,elevation,r) transforms
corresponding elements of the spherical coordinate arrays azimuth, elevation,
and r to Cartesian, or xyz,
coordinates.
Convert the spherical coordinates defined by corresponding entries in the matrices az, el, and r to Cartesian coordinates x, y, and z. These points correspond to the eight vertices of a cube.
az = [0.7854 0.7854 -0.7854 -0.7854; 2.3562 2.3562 -2.3562 -2.3562]
Azimuth angle, specified as a scalar, vector, matrix, or multidimensional
array. azimuth, elevation, and r must
be the same size, or any of them can be scalar.
azimuth is the counterclockwise angle in
the x-y plane measured in radians
from the positive x-axis.
Data Types: single | double Complex Number Support: Yes
Elevation angle, specified as a scalar, vector, matrix, or multidimensional
array. azimuth, elevation, and r must
be the same size, or any of them can be scalar.
elevation is the elevation angle in radians
from the x-y plane.
Data Types: single | double Complex Number Support: Yes
Radius, specified as a scalar, vector, matrix, or multidimensional
array. azimuth, elevation, and r must
be the same size, or any of them can be scalar.
The length units of r can be arbitrary, and
the output arrays x, y, and z use
the same units.
Data Types: single | double Complex Number Support: Yes