Commit 831855ef authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

bugfix spherical slice

use exact search in plot_freqSlice
parent 0f11afd4
...@@ -710,6 +710,12 @@ classdef itaHRTF < itaAudio ...@@ -710,6 +710,12 @@ classdef itaHRTF < itaAudio
if ~exactSearch if ~exactSearch
phiU = rad2deg(this.phi_Unique); phiU = rad2deg(this.phi_Unique);
thetaU = rad2deg(this.theta_Unique); thetaU = rad2deg(this.theta_Unique);
switch dirID
case {'phi_deg', 'p'}
slice = this.findnearestHRTF(thetaU,dir_deg);
case {'theta_deg', 't'}
slice = this.findnearestHRTF(dir_deg,phiU);
end
else else
earCoords = this.getEar('L').channelCoordinates; earCoords = this.getEar('L').channelCoordinates;
switch dirID switch dirID
...@@ -731,12 +737,7 @@ classdef itaHRTF < itaAudio ...@@ -731,12 +737,7 @@ classdef itaHRTF < itaAudio
slice = this.findnearestHRTF(dir_deg,phiU); slice = this.findnearestHRTF(dir_deg,phiU);
end end
end end
% switch dirID
% case {'phi_deg', 'p'}
% slice = this.findnearestHRTF(thetaU,dir_deg);
% case {'theta_deg', 't'}
% slice = this.findnearestHRTF(dir_deg,phiU);
% end
end end
function slice = ss(this,dirID,dir_deg) function slice = ss(this,dirID,dir_deg)
...@@ -1318,10 +1319,10 @@ classdef itaHRTF < itaAudio ...@@ -1318,10 +1319,10 @@ classdef itaHRTF < itaAudio
ita_verbose_info(' More than one elevation in this object!', 0); ita_verbose_info(' More than one elevation in this object!', 0);
if strcmp(sArgs.plane,'horizontal') if strcmp(sArgs.plane,'horizontal')
thetaC_deg = 90; thetaC_deg = 90;
thisC = this.sphericalSlice('theta_deg', thetaC_deg); thisC = this.sphericalSlice('theta_deg', thetaC_deg,1);
elseif strcmp(sArgs.plane,'median') elseif strcmp(sArgs.plane,'median')
phiC_deg = 0; phiC_deg = 0;
thisC = this.sphericalSlice('phi_deg', phiC_deg); thisC = this.sphericalSlice('phi_deg', phiC_deg,1);
end end
else thisC = this; else thisC = this;
end end
......
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