This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% The azimuth angles of the loudspeakers in degrees | |
speakerAzimuthAngles = [30, 110, 150, -150, -110, -30]; | |
% Unit vectors for the loudspeakers. Note that matrix is constructed as the transpose of the vectors. | |
% When P' = G * L, the result P' is the correct p = g1 L1 + g2 L2 by scaled vector addition. The the | |
% projections of the unit vectors sum to the unit vector in the direction of the source. | |
[x, y] = pol2cart(speakerAzimuthAngles / 180 * pi, ones(size(speakerAzimuthAngles))); | |
L = cat(2, x', y'); | |
ngroups = [(1:length(speakerAzimuthAngles))', [2:length(speakerAzimuthAngles) 1]']; |