THE AUDITORY MODELING TOOLBOX

Applies to version: 1.6.0

View the code

Go to function

cart2horpolar
Convert from Cartesian to horizontal-polar coordinate system

Usage:

[lat,pol]=cart2horpolar(x,y,z);

Input parameters:

x X coordinate. Can be scalar or a vector.
y Y coordinate. Must be scalar or the size of x.
z Z coordinate. Must be scalar or the size of x.

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]=cart2horpolar(x,y,z); converts the Cartesian coordinates x,y,z, 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.