% SUpDEq - Spatial Upsampling by Directional Equalization function [gridData, Npoints, Nmax] = supdeq_lebedev(numOfSP, N) This function returns a Lebedev sampling grid with azimuth and elevation in degree plus the respective sampling weights. Output: gridData - Q x 3 matrix where the first column holds the azimuth, the second the elevation, and the third the sampling weights. Npoints - Total number of sampling points / nodes Nmax - Highest stable grid order Input: numOfSP - Number of sampling points / nodes. Call supdeq_lebedev() to get a list of valid numbers. N - Instead of numOfSP, the spatial order N of the Lebedev grid can be passed. If N is passed, numOfSP will be ignored. Dependencies: SOFiA toolbox (C) 2018 by JMA, Johannes M. Arend TH Köln - University of Applied Sciences Institute of Communications Engineering Department of Acoustics and Audio Signal Processing
0001 %% SUpDEq - Spatial Upsampling by Directional Equalization 0002 % 0003 % function [gridData, Npoints, Nmax] = supdeq_lebedev(numOfSP, N) 0004 % 0005 % This function returns a Lebedev sampling grid with azimuth and elevation 0006 % in degree plus the respective sampling weights. 0007 % 0008 % Output: 0009 % gridData - Q x 3 matrix where the first column holds the azimuth, the 0010 % second the elevation, and the third the sampling weights. 0011 % Npoints - Total number of sampling points / nodes 0012 % Nmax - Highest stable grid order 0013 % 0014 % Input: 0015 % numOfSP - Number of sampling points / nodes. 0016 % Call supdeq_lebedev() to get a list of valid numbers. 0017 % N - Instead of numOfSP, the spatial order N of the Lebedev 0018 % grid can be passed. If N is passed, numOfSP will be 0019 % ignored. 0020 % 0021 % Dependencies: SOFiA toolbox 0022 % 0023 % (C) 2018 by JMA, Johannes M. Arend 0024 % TH Köln - University of Applied Sciences 0025 % Institute of Communications Engineering 0026 % Department of Acoustics and Audio Signal Processing 0027 0028 function [gridData, Npoints, Nmax] = supdeq_lebedev(numOfSP, N) 0029 0030 if nargin == 0 0031 sofia_lebedev(); 0032 end 0033 0034 if nargin == 2 0035 %Get Lebedev sampling grid according to N 0036 lebN = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65]; 0037 lebNumPoints = [6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810]; 0038 0039 if isempty(find(N == lebN)) 0040 error('No Lebedev grid available with given spatial order N.'); 0041 end 0042 0043 %Get numOfSP according to N 0044 numOfSP = lebNumPoints(find(N == lebN)); 0045 end 0046 0047 [gridData, Npoints, Nmax] = sofia_lebedev(numOfSP,0); 0048 %Convert from rad 2 deg 0049 gridData(:,1:2) = gridData(:,1:2)*180/pi; 0050 0051 end 0052