Skip to main content

computeMuscleTendonLengthInitializationOptimization.m


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


function optimizedValues = computeMuscleTendonLengthInitializationOptimization( ...
initialValues, lowerBounds, upperBounds, experimentalData, ...
optimizerOptions)

optimizedValues = lsqnonlin(@computeMuscleTendonLengthInitializationCostFunction, ...
initialValues, lowerBounds, upperBounds, optimizerOptions, ...
experimentalData);
end