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

Added plot function for the trajectory reference position.

parent 87ae3ea2
No related branches found
No related tags found
No related merge requests found
function [scatterHandles, textHandles] = plotTrajectoryReferencePositions(pAxesHandle, pTrajectory)
%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, 'x');
% Plot text
for i = 1:length(x)
textHandles = text( ...
pAxesHandle, x(i), y(i), {'', [' ' num2str(pTrajectory.id) '.' num2str(i)]} ...
);
end
hold(pAxesHandle, 'off');
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