THE AUDITORY MODELING TOOLBOX

Applies to version: 1.6.0

View the code

Go to function

sph2horpolar
Convert from spherical to horizontal-polar coordinate system

Usage:

[lat,pol] = sph2horpolar(azi,ele);

Input parameters:

azi Azimuth angle in degrees. Can be scalar or a vector.
ele Elevation angle in degrees. Must be scalar or the size of azi.

Output parameters:

lat Lateral angle in degrees, ranging from -90 \(^\circ\) to +90 \(^\circ\).
pol Polar angle in degress, ranging from -90 \(^\circ\) to +270 \(^\circ\).

Description:

[lat,pol] = sph2horpolar(azi,ele); converts the direction given by the azimuth angle azi and elevation angle ele into the coordinates of the horizontal-polar system as shown in Fig. 2 in Majdak et al., (2013). In that coordinate system, a point on a sphere is described by the lateral angle lat and polar angle pol.

References:

P. Majdak, T. Walder, and B. Laback. Effect of long-term training on sound localization performance with spectrally warped and band-limited head-related transfer functions. The Journal of the Acoustical Society of America, 134:2148--2159, 2013.