Aufgrund einer Wartung wird GitLab am 04.06. zwischen 8:00 und 10:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 04.06. between 8:00 and 10:00 am.

Commit 37b586d9 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

some quick fix in spherical slice to only get one slice.

parent 8490ec6b
......@@ -698,12 +698,37 @@ classdef itaHRTF < itaAudio
phiUni = rad2deg(phi_Unique(this,varargin));
end
function slice = sphericalSlice(this,dirID,dir_deg)
function slice = sphericalSlice(this,dirID,dir_deg,exactSearch)
% dir in degree
% dirID [phi, theta]
if ~exist('exactSearch','var')
exactSearch = 0;
end
phiU = rad2deg(this.phi_Unique);
thetaU = rad2deg(this.theta_Unique);
if ~exactSearch
phiU = rad2deg(this.phi_Unique);
thetaU = rad2deg(this.theta_Unique);
else
earCoords = this.getEar('L').channelCoordinates;
switch dirID
case {'phi_deg', 'p'}
phiValues = unique(earCoords.phi_deg);
[~,index] = min(abs(phiValues - dir_deg));
exactPhiValue = phiValues(index);
tmp = earCoords.n(earCoords.phi_deg == exactPhiValue);
thetaU = tmp.theta_deg;
slice = this.findnearestHRTF(thetaU,dir_deg);
case {'theta_deg', 't'}
thetaValues = unique(earCoords.theta_deg);
[~,index] = min(abs(thetaValues - dir_deg));
exactThetaValue = thetaValues(index);
tmp = earCoords.n(earCoords.theta_deg == exactThetaValue);
phiU = tmp.phi_deg;
slice = this.findnearestHRTF(dir_deg,phiU);
end
end
switch dirID
case {'phi_deg', 'p'}
slice = this.findnearestHRTF(thetaU,dir_deg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment