% 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 = calcTendonSlackLengthScaleFactorDeviationCost(values, ...
costTerm)
errorCenter = valueOrAlternate(costTerm, "errorCenter", 1);
maximumAllowableError = valueOrAlternate(costTerm, "maxAllowableError", 1);
cost = calcDeviationCostArray(...
values.tendonSlackLengthScaleFactors, errorCenter, ...
maximumAllowableError);
end