% This function is part of the NMSM Pipeline, see file for full license.
%
% (Array of number, struct) -> (Array of number)
% returns the cost for all rounds of the Muscle Tendon optimization
function cost = computeMuscleTendonCostFunction(secondaryValues, ...
primaryValues, isIncluded, experimentalData, params)
values = makeMtpValuesAsStruct(secondaryValues, primaryValues, isIncluded);
synxModeledValues = calcMtpSynXModeledValues(values, experimentalData, params);
modeledValues = calcMtpModeledValues(values, experimentalData, params);
cost = calcMtpCost(values, synxModeledValues, modeledValues, ...
experimentalData, params);
end