Skip to main content

computeMuscleTendonRoundOptimization.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function runs fmincon for MuscleTendonPersonalization with settings
% controlled by the input params.
%
% (Array of number, struct, struct) -> (Array of number)
% returns the optimized values from Muscle Tendon optimization round


function optimizedValues = computeMuscleTendonRoundOptimization( ...
initialValues, primaryValues, isIncluded, lowerBounds, upperBounds, ...
experimentalData, params, optimizerOptions, A, b)

optimizedValues = fmincon(@(values)computeMuscleTendonCostFunction( ...
values, primaryValues, isIncluded, experimentalData, params), ...
initialValues, A, b, [], [], lowerBounds, upperBounds, ...
@(values)calcMuscleTendonNonLinearConstraints(values, primaryValues, ...
isIncluded, experimentalData, params), optimizerOptions);
end