Skip to main content

calcStateVelocityPeriodicity.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function calculates the difference between the starting and final
% state velocity for the specified coordinate.
%
% (2D matrix, Cell, Array of string) -> (Number)
%


function stateVelocityPeriodicity = calcStateVelocityPeriodicity( ...
stateVelocities, coordinateNames, coordinateName)
indx = find(strcmp(convertCharsToStrings(coordinateNames), ...
coordinateName));
stateVelocityPeriodicity = diff(stateVelocities(:, indx));
end