You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: msf_fit.m
    path of file: ./repos/md-dmri/msf
    
    the code of the file until where you have to start completion: function [t,ss] = msf_fit(f, s, l, u, n, opt)
% function [t,ss] = msf_fit(f, s, l, u, n, opt)
%
% Perform lsqcurvefit with function 'f' on data 's', repeating it 'n' times
%
% f - function handle
% s - signal
% l - lower bound
% u - upper bound
% n - number of repetitions

    
function [t,ss] = msf_fit(f, s, l, u, n, opt)
% function [t,ss] = msf_fit(f, s, l, u, n, opt)
%
% Perform lsqcurvefit with function 'f' on data 's', repeating it 'n' times
%
% f - function handle
% s - signal
% l - lower bound
% u - upper bound
% n - number of repetitions
% opt - options for lsqcurvefit

if (nargin < 6) % slow
    opt = optimoptions(...
        'lsqcurvefit', 'display', ...
        'off','MaxFunEvals',1e4); 
end