% This function is part of the NMSM Pipeline, see file for full license.
%
%
%
% (struct) -> (struct)
% Calculates normalized positions for foot markers.
function normalizedMarkerPositions = normalizeMarkerPositions( ...
markerPositions)
markerNamesList = fieldnames(markerPositions);
normalizedFootHeight = abs(markerPositions.toe(1) - ...
markerPositions.heel(1));
normalizedFootWidth = abs(markerPositions.medial(2) - ...
markerPositions.lateral(2));
for i=1:length(markerNamesList)
normalizedMarkerPositions.(markerNamesList{i})(1) = ...
markerPositions.(markerNamesList{i})(1) / normalizedFootHeight;
normalizedMarkerPositions.(markerNamesList{i})(2) = ...
markerPositions.(markerNamesList{i})(2) / normalizedFootWidth;
end
end