Skip to content
Snippets Groups Projects
Commit 38d6c4af authored by leprob001's avatar leprob001
Browse files

Fixed bug in plotting reference positions.

parent a85e6345
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ function [scatterHandles, textHandles] = plotTrajectoryReferencePositions(pAxesH ...@@ -4,6 +4,7 @@ function [scatterHandles, textHandles] = plotTrajectoryReferencePositions(pAxesH
x = []; x = [];
y = []; y = [];
n = [];
for i = 1:length(pTrajectory.trackParameter.soundsourceCombinations.referencePosition) for i = 1:length(pTrajectory.trackParameter.soundsourceCombinations.referencePosition)
current = pTrajectory.trackParameter.soundsourceCombinations.referencePosition{i}; current = pTrajectory.trackParameter.soundsourceCombinations.referencePosition{i};
...@@ -13,6 +14,7 @@ for i = 1:length(pTrajectory.trackParameter.soundsourceCombinations.referencePos ...@@ -13,6 +14,7 @@ for i = 1:length(pTrajectory.trackParameter.soundsourceCombinations.referencePos
tmp = str2double(strsplit(current)); tmp = str2double(strsplit(current));
x = [x; tmp(2)]; x = [x; tmp(2)];
y = [y; tmp(1)]; y = [y; tmp(1)];
n = [n; i];
end end
...@@ -34,14 +36,14 @@ textHandles = cell(1, length(x)); ...@@ -34,14 +36,14 @@ textHandles = cell(1, length(x));
if pPlotAsMap if pPlotAsMap
for i = 1:length(x) for i = 1:length(x)
textHandles{i} = textm( ... textHandles{i} = textm( ...
y(i), x(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(i)]}, ... y(i), x(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(n(i))]}, ...
'Color', pColor ... 'Color', pColor ...
); );
end end
else else
for i = 1:length(x) for i = 1:length(x)
textHandles{i} = text( ... textHandles{i} = text( ...
pAxesHandle, x(i), y(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(i)]}, ... pAxesHandle, x(i), y(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(n(i))]}, ...
'Color', pColor ... 'Color', pColor ...
); );
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment