logy(evol_crit,'linewidth',2);
hold on; semilogy(1:Nit,0.001*ones(Nit,1),'kREPLACE_WITH_DASH_DASH','linewidth',2); % threshold
text(1.5,1.5e-3,'\fontsize{30}T = 0.1 %');
legend('Time warping','Amplitude modulation','Spectrum'); axis tight;
grid on; xlabel('Iteration'); ylabel('Relative update');

%% MSE
errAM = (aML(:).^2 - a.^2).^2;
errAM = errAM(Dt:end); % First sample of thetaAM is rejected because of boundaries effect
mseAM = mean(errAM.^2);
mseAM0 = mean((thetaAM_B(:) - a.^2).^2);
mseWP = mean((log2(dg