Plotting multiple object trajectories together with their identity
이전 댓글 표시
Hi, I have a matfile 'a' which have the time in the first column, identity of objects from the first row of second column till the end and their X and Y coordinates.
What i want to do is to plot the trajectories of all these objects together like a movie so that i can keep track of the objects along with their identity displayed.
I am able to plot the trajectory for a single choosen object as shown below. Can anyone give an idea ?
Any help to solve this will be appreciated.
%% Loading mat file and keep time and coordinates of individual objects in a cell
load('a.mat')
final_plot_mat_missing_part = a(:,:);
Ucolumnnames_fpm = unique(final_plot_mat_missing_part(1,2:end));
finaL_plot_matrix_cell = cell(1,numel(Ucolumnnames_fpm));
for ii = 1:numel(finaL_plot_matrix_cell) %numel returns the number of elements.
idx_time_needed_f = final_plot_matrix(1,:) == Ucolumnnames_fpm(ii);
finaL_plot_matrix_cell{ii} = [final_plot_mat_missing_part(1:end,3),final_plot_mat_missing_part(1:end,idx_time_needed_f)];
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Vehicle Scenarios에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


