function Y=separa_anemuller(X,F);

f=1;
wij=eye(2);
tau=zeros(2);
W=wij;
y=W*[X(f,:,1);X(f,:,2)];
W=CII_beta3_complejo(W,y,0.1);
arg(:,:,f)=W.*[1,-1;-1,1];
wij=abs(W);
fase=0;

for f=2:length(F)
    omega=2*pi*F(f);
    W=(wij.*[1,-1;-1,1]).*exp(-j*omega*tau);
    y=W*[X(f,:,1);X(f,:,2)];
    W=CII_beta3_complejo(W,y,0.1);
    arg(:,:,f)=W.*[1,-1;-1,1];
    wij=abs(W);
    
    aux=phase(squeeze(arg(1,1,1:f)).');
    fase(1,1)=aux(f);
    aux=phase(squeeze(arg(1,2,1:f)).');
    fase(1,2)=aux(f);
    aux=phase(squeeze(arg(2,1,1:f)).');
    fase(2,1)=aux(f);
    aux=phase(squeeze(arg(2,2,1:f)).');
    fase(2,2)=aux(f);

    tau=-fase/omega;
end

%wij(1,:)=wij(1,:)/wij(1,1);
%wij(2,:)=wij(2,:)/wij(2,2);

wij=wij.*[1,-1;-1,1];
tau(1,:)=tau(1,:)-tau(1,1);tau(2,:)=tau(2,:)-tau(2,2);
[Y,W]=demezcla_con_retardo_n(X,F,wij,tau);