; 
legend({'Baseline estimate','JEFAS estimate','$\theta_{n,2}$','$\theta_{n,2}\pm 3\sqrt{\mathrm{CRLB}(\theta_{n,2})}$'},'interpreter','latex');
xlabel('Time (s)'); ylabel('Time warping');

%% Spectrum estimation
freq = linspace(0,Fs,2*Nf - 1);

figure;
plot(freq,Sx,'-.b',freq,Sxest,'r','linewidth',2);
xlabel('Frequency (Hz)');ylabel('Spectrum'); 
grid on; axis tight;
legend('True spectrum','Estimated spectrum'); 
V=axis; axis([300 1600 0 V(4)]);

%% Stopping criterion
Nit = size(evol_crit,1);
figure;
semi