function out=legTrackerPrepDerivatives(data)
%legTrackerPrepDerivatives takes the output of legTrackerErrorCheck.m and
%outputs a version where the frame-by-frame value of each vector has been
%replaced with that vector's derivative at that frame, calculated as the
%difference between the value at the previous and subsequent frames.
%Usage:
%out=legTrackerPrepDerivatives(data)
%data = output from legTrackerErrorCheck.m
%allocate for output in memory.
out=zeros(size(data));
%calculate derivatives
out(4:end-3,:)=data(7:end,:)-data(1:end-6,:);