% SUpDEq - Spatial Upsampling by Directional Equalization function [gridData, Npoints, Nmax] = supdeq_extremal(N) This function returns an extremal sampling grid with azimuth and elevation in degree plus the respective sampling weights. The nodes for 1 <= N <= 100 are from https://web.maths.unsw.edu.au/~rsw/Sphere/Extremal/New/index.html 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 [(N+1)^2] Nmax - Highest stable grid order Input: N - Spatial order of the extremal grid. Dependencies: - (C) 2020 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_extremal(N) 0004 % 0005 % This function returns an extremal sampling grid with azimuth and 0006 % elevation in degree plus the respective sampling weights. 0007 % The nodes for 1 <= N <= 100 are from 0008 % https://web.maths.unsw.edu.au/~rsw/Sphere/Extremal/New/index.html 0009 % 0010 % Output: 0011 % gridData - Q x 3 matrix where the first column holds the azimuth, the 0012 % second the elevation, and the third the sampling weights. 0013 % Npoints - Total number of sampling points / nodes [(N+1)^2] 0014 % Nmax - Highest stable grid order 0015 % 0016 % Input: 0017 % N - Spatial order of the extremal grid. 0018 % 0019 % Dependencies: - 0020 % 0021 % (C) 2020 by JMA, Johannes M. Arend 0022 % TH Köln - University of Applied Sciences 0023 % Institute of Communications Engineering 0024 % Department of Acoustics and Audio Signal Processing 0025 0026 function [gridData, Npoints, Nmax] = supdeq_extremal(N) 0027 0028 if nargin == 0 0029 error('Please specify the desired spatial order N!'); 0030 elseif N <= 0 0031 error('Sorry, but N >= 1 is mandatory'); 0032 elseif N > 100 0033 error('Sorry, but we only have extremal grids up to N = 100'); 0034 else 0035 % Load nodes from materials 0036 load('extremalNodes_1_100.mat'); 0037 0038 %Get respective grid data already in correct format 0039 gridData = extremalNodes{N}; 0040 0041 %Write other variables 0042 Npoints = size(gridData,1); 0043 Nmax = N; 0044 0045 end 0046 0047 end 0048