Commit 7dadfce6 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

bugfix for phase plot

parent 3a8d8034
...@@ -117,11 +117,11 @@ if ~isempty(thetaVal) ...@@ -117,11 +117,11 @@ if ~isempty(thetaVal)
else else
error([thisFuncStr 'no appropriate values found, could not create plot']); error([thisFuncStr 'no appropriate values found, could not create plot']);
end end
angles(angles > 180) = mod(angles(angles > 180),180) - 180; %#ok<AGROW> angles(angles > 180) = mod(angles(angles > 180),180) - 180;
end end
else else
for iPhi = 1:numel(phiVal) for iPhi = 1:numel(phiVal)
idxPlotData = find(abs(phi - phiVal(iPhi)) <= phiRes*0.4); %#jtu: magic number 0.4? idxPlotData = find(abs(phi - phiVal(iPhi)) <= phiRes*0.4); %jtu: magic number 0.4?
if ~isempty(idxPlotData) if ~isempty(idxPlotData)
[tmpAngles,idxAngles] = sort(input.channelCoordinates.theta_deg(idxPlotData)); [tmpAngles,idxAngles] = sort(input.channelCoordinates.theta_deg(idxPlotData));
angles = [angles; tmpAngles.*signVals(iPhi)]; %#ok<AGROW> angles = [angles; tmpAngles.*signVals(iPhi)]; %#ok<AGROW>
...@@ -162,7 +162,7 @@ if strcmpi(sArgs.plotDomain,'freq') ...@@ -162,7 +162,7 @@ if strcmpi(sArgs.plotDomain,'freq')
ita_verbose_info('values are complex => plotting absolute value',0) ita_verbose_info('values are complex => plotting absolute value',0)
plotData = abs(plotData); plotData = abs(plotData);
end end
else strcmpi(sArgs.plotType,'phase') elseif strcmpi(sArgs.plotType,'phase')
yTitle = 'deg'; yTitle = 'deg';
plotData = unwrap(angle(plotData)).*180/pi; plotData = unwrap(angle(plotData)).*180/pi;
if sArgs.normalize if sArgs.normalize
......
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