Skip to main content

removeNormalizedMarkerOffsets.m


% This function is part of the NMSM Pipeline, see file for full license.
%
%
%
% (struct) -> (struct)
% Removes offset from zero from normalized foot marker positions.


function normalizedMarkerPositions = removeNormalizedMarkerOffsets( ...
normalizedMarkerPositions)
markerNamesList = fieldnames(normalizedMarkerPositions);
normalizedFootXOffset = normalizedMarkerPositions.heel(1);
normalizedFootZOffset = min(normalizedMarkerPositions.medial(2), ...
normalizedMarkerPositions.lateral(2));
for i=1:length(markerNamesList)
normalizedMarkerPositions.(markerNamesList{i})(1) = ...
normalizedMarkerPositions.(markerNamesList{i})(1) - ...
normalizedFootXOffset;
normalizedMarkerPositions.(markerNamesList{i})(2) = ...
normalizedMarkerPositions.(markerNamesList{i})(2) - ...
normalizedFootZOffset;
end
end