function eps = misfit_extended(time_steps,pdf_tuts,pdf_tu,x) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% auxilliary function with one extra parameter to optimise %%% %%% x: extended vector of parameters to optimise made up of pdf_ts and w %%% (weight factor in the main misfit function -- see the relevant module) %%% %%% Dmitry Yumashev, 21/11/2019 %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pdf_ts = x(1:end-1); % all parameters to optimise but the last one w = x(end); % the last parameter to optimise = weight between two distributions in the misfit function eps = misfit(time_steps,pdf_tuts,pdf_tu,pdf_ts,w); end