function delta=Halla_delta(F,T,X,fs)

sizeF=length(F);
sizeT=length(T);
% Para la notacion ver paper de Yilmaz y Rickard pag. 21 (6 del .pdf)
umbral=.05;
ceros=0;
for f=2:sizeF
    omega=2*pi*F(f);
    R21(f,:)=zeros(1,sizeT);
    for t=1:length(T)
        if (abs(X(f,t,1)) < umbral && abs(X(f,t,2)) < umbral)
            R21(f,t)=NaN;
            delta(f,t)=NaN;
            ceros=ceros+1;
        else
            R21(f,t)=X(f,t,2)/X(f,t,1);
            delta(f,t)=fs*(-1/omega)*angle(R21(f,t));
        end
    end
end