% This function is part of the NMSM Pipeline, see file for full license.
%
%
% (struct, struct, struct) -> (struct)
% returns the modeled values for the given inputs for MTP
function modeledValues = calcMtpModeledValues(values, ...
experimentalData, params)
modeledValues.muscleExcitations = calcMuscleExcitations(experimentalData.emgTime, ...
experimentalData.emgSplines, values.electromechanicalDelays, ...
values.emgScaleFactors);
neuralActivations = calcNeuralActivations(modeledValues.muscleExcitations, ...
values.activationTimeConstants, experimentalData.emgTime, ...
experimentalData.numPaddingFrames);
modeledValues.muscleActivations = calcMuscleActivations( ...
neuralActivations, values.activationNonlinearityConstants);
[modeledValues.normalizedFiberLength, ...
modeledValues.normalizedFiberVelocity] = ...
calcNormalizedMuscleFiberLengthsAndVelocities(experimentalData, ...
values.optimalFiberLengthScaleFactors, ...
values.tendonSlackLengthScaleFactors);
modeledValues.passiveForce = calcPassiveForceLengthCurve( ...
modeledValues.normalizedFiberLength, ...
experimentalData.maxIsometricForce, ...
experimentalData.pennationAngle);
modeledValues.muscleJointMoments = calcMuscleJointMoments( ...
experimentalData, modeledValues.muscleActivations, ...
modeledValues.normalizedFiberLength, ...
modeledValues.normalizedFiberVelocity);
end