function [scatterHandles, textHandles] = plotTrajectoryReferencePositions(pAxesHandle, pTrajectory, pColor) %PLOTTRAJECTORYREFERENCEPOSITIONS Summary of this function goes here % Detailed explanation goes here %% Prepare variables referencePositions = pTrajectory.trackParameter.soundsourceCombinations.referencePosition; referencePositions = cellfun(@strsplit, referencePositions, 'UniformOutput', false); referencePositions = cellfun(@str2double, referencePositions, 'UniformOutput', false); referencePositions = cell2mat(referencePositions); x = referencePositions(:, 2); y = referencePositions(:, 1); %% Plot hold(pAxesHandle, 'on'); scatterHandles = scatter(pAxesHandle, x, y, [], pColor, 'x'); % Plot text textHandles = cell(1, length(x)); for i = 1:length(x) textHandles{i} = text( ... pAxesHandle, x(i), y(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(i)]}, ... 'Color', pColor ... ); end hold(pAxesHandle, 'off'); end