Skip to main content

calcActivationTimeConstantDeviationCost.m


% 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 = calcActivationTimeConstantDeviationCost(values, costTerm)
errorCenter = valueOrAlternate(costTerm, "errorCenter", 0.015);
maximumAllowableError = valueOrAlternate(costTerm, "maxAllowableError", 0.02);
cost = calcDeviationCostTerm( ...
values.activationTimeConstants/100, errorCenter, ...
maximumAllowableError);
end