Newer
Older
function [scatterHandles, textHandles] = plotTrajectoryReferencePositions(pAxesHandle, pTrajectory, pColor, pPlotAsMap)
%PLOTTRAJECTORYREFERENCEPOSITIONS Summary of this function goes here
% Detailed explanation goes here
for i = 1:length(pTrajectory.trackParameter.soundsourceCombinations.referencePosition)
current = pTrajectory.trackParameter.soundsourceCombinations.referencePosition{i};
if strcmp('', strtrim(current))
continue;
end
tmp = str2double(strsplit(current));
x = [x; tmp(2)];
y = [y; tmp(1)];
% make handle the current axes
axes(pAxesHandle);
hold(pAxesHandle, 'on');
if pPlotAsMap
scatterHandles = scatterm(pAxesHandle, y, x, [], pColor, 'x');
else
scatterHandles = scatter(pAxesHandle, x, y, [], pColor, 'x');
end
if pPlotAsMap
for i = 1:length(x)
textHandles{i} = textm( ...
y(i), x(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(n(i))]}, ...
'Color', pColor ...
);
end
else
for i = 1:length(x)
textHandles{i} = text( ...
pAxesHandle, x(i), y(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(n(i))]}, ...
'Color', pColor ...
);
end