Skip to main content

calcMinimizingBreakingForceIntegrand.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function minimizes the breaking force for the specified foot.
%
% (struct, struct, struct) -> (Array of number)
%


function cost = calcMinimizingBreakingForceIntegrand(modeledValues, ...
params, costTerm)

for i = 1:length(params.contactSurfaces)
if params.contactSurfaces{i}.isLeftFoot == costTerm.is_left_foot
breakingForce = getBreakingForce( ...
modeledValues.groundReactionsLab.forces{i}(:,1));
end
end
cost = calcMinimizingCostArrayTerm(breakingForce);
end