_typ,wav_param);

thetaWP_B = baselinewarpest(Wy,scalesAM);
thetaAM_B = baselineAMest(Wy);

thetaWPV = log2(dgamma(1:Dt:end)).';
thetaAMV = (a(1:Dt:end).^2).';
bWP = crlbWP(thetaWPV,thetaAMV,Sx+eps,scalesWP,wav_typ,wav_paramWP);
WPinf = thetaWPV - 3*sqrt(bWP);
WPsup = thetaWPV + 3*sqrt(bWP);

bAM = crlbAM(thetaAMV,scalesAM);
AMinf = thetaAMV - 3*sqrt(bAM);
AMsup = thetaAMV + 3*sqrt(bAM);

t = linspace(0,(T-1)/Fs,T);
th = t(1:Dt:end);

figure;
plot(t,aML.^2,'r',t,a.^2,'b-.',th,AMinf,'bREPLACE_WITH_DASH_DASH'