Permalink
Cannot retrieve contributors at this time
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?
GPS-Tracking-of-On-Campus-Walking-Project/MATLAB_Functions/HuskyTrack/SenDes_HuskyTrack/SortData.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (21 sloc)
693 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% | |
% 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 | |