Skip to main content

writeExperimentalFootKinematicsToSto.m


% This function is part of the NMSM Pipeline, see file for full license.
%
%
%
% (struct, string, string) -> (None)
% Write experimental foot kinematics to an OpenSim Storage file.


function writeExperimentalFootKinematicsToSto(inputs, resultsDirectory, ...
modelName)
for foot = 1:length(inputs.surfaces)
columnLabels = [convertCharsToStrings(inputs.surfaces{foot} ...
.toesCoordinateName), "Rotation1", "Rotation2", "Rotation3", ...
"Translation1", "Translation2", "Translation3"];
writeToSto( ...
columnLabels, ...
inputs.surfaces{foot}.time, ...
inputs.surfaces{foot}.experimentalJointPositions', ...
fullfile(resultsDirectory, strcat(modelName, "_Foot_", ...
num2str(foot), "_experimentalFootKinematics.sto")));
end
end