Skip to main content

calcRootSegmentResidualsPeriodicity.m


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


function rootSegmentResidualsPeriodicity = calcRootSegmentResidualsPeriodicity( ...
inverseDynamicMoments, inverseDynamicMomentLabels, loadNames)
indx = find(strcmp(convertCharsToStrings(inverseDynamicMomentLabels), ...
loadNames));
rootSegmentResidualsPeriodicity = diff(inverseDynamicMoments(:, indx));
end