Commit 0fdbc751 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

added phase plot to itaHRTF.plot_freqSlice

parent 0c2578ad
...@@ -1342,7 +1342,7 @@ classdef itaHRTF < itaAudio ...@@ -1342,7 +1342,7 @@ classdef itaHRTF < itaAudio
function plot_freqSlice(varargin) function plot_freqSlice(varargin)
% init % init
sArgs = struct('pos1_data','itaHRTF', 'earSide', 'L','plane','horizontal','axes_handle',gca); sArgs = struct('pos1_data','itaHRTF', 'earSide', 'L','plane','horizontal','axes_handle',gca,'plotData','magnitude');
[this,sArgs]= ita_parse_arguments(sArgs,varargin); [this,sArgs]= ita_parse_arguments(sArgs,varargin);
ah = sArgs.axes_handle; ah = sArgs.axes_handle;
...@@ -1409,9 +1409,15 @@ classdef itaHRTF < itaAudio ...@@ -1409,9 +1409,15 @@ classdef itaHRTF < itaAudio
fMax = thisCs.freqVector(idxfMax); fMax = thisCs.freqVector(idxfMax);
% [tick, lab] = ita_plottools_ticks('log'); % [tick, lab] = ita_plottools_ticks('log');
data_dB= thisCs.freqData_dB; if strcmp(sArgs.plotData,'magnitude')
cMax = max(max(data_dB(2:idxfMax,:))); data_dB= thisCs.freqData_dB;
cMin = min(min(data_dB(2:idxfMax,:)))*0.5; cMax = max(max(data_dB(2:idxfMax,:)));
cMin = min(min(data_dB(2:idxfMax,:)))*0.5;
else
data_dB= unwrap(angle(thisCs.freqData));
cMax = max(max(data_dB(2:idxfMax,:)));
cMin = min(min(data_dB(2:idxfMax,:)))*0.5;
end
pcolor(ah, thisCs.freqVector,xData,data_dB(:,thisCs.EarSide == earSidePlot)'); pcolor(ah, thisCs.freqVector,xData,data_dB(:,thisCs.EarSide == earSidePlot)');
[xticks, xlabels] = ita_plottools_ticks('log'); [xticks, xlabels] = ita_plottools_ticks('log');
...@@ -1425,6 +1431,10 @@ classdef itaHRTF < itaAudio ...@@ -1425,6 +1431,10 @@ classdef itaHRTF < itaAudio
title(strTitle) title(strTitle)
shading interp shading interp
if ~strcmp(sArgs.plotData,'magnitude')
colormap(hsv)
% caxis([0 2*pi]);
end
cb = colorbar; cb = colorbar;
zlab = get(cb,'ylabel'); zlab = get(cb,'ylabel');
set(zlab,'String','Level in [dB]'); set(zlab,'String','Level in [dB]');
......
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