Skip to content
Permalink
e4ea08dae2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
25 lines (21 sloc) 693 Bytes
%
% Function: SortData
% Author: Michael T. Ballard (michael.ballard@uconn.edu)
% Date: Spring 2019
%
% Description: The SortData function sorts a HuskyTrack retrieved data
% struct by the timestamp of each location point. Should not
% be necessary for data taken directly from th database.
%
% Parameters: dataMat - A matrix of HuskyTrack Data to be sorted
%
%
% Return: 0 - Successful Termination
%
function [success] = SortData(dataMat)
[r,c] = size(dataMat);
for i = 1:r
[tmp ind] = sort({dataMat(i).locations.timestamp});
dataMat(i) = dataMat(i).locations(ind);
end
end