[lat,pol]=cart2horpolar(x,y,z);
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. |
lat | Lateral angle in degrees, ranging from -90 \(^\circ\) to +90 \(^\circ\). |
pol | Polar angle in degress, ranging from -90 \(^\circ\) to +270 \(^\circ\). |
[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.
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.