function mixed_cond=signs_sigma(Bperp,Mperp)
signsBperp=[];
signsMperp=[];
for j1=1:7
  for j2=j1+1:8
    for j3=j2+1:9
      for j4=j3+1:10  
       signsBperp=[signsBperp,sign(det(Bperp(:,[j1 j2 j3 j4])))];%vector that keeps the signs of the subdeterminants of Bperp
       signsMperp=[signsMperp,sign(det(Mperp(:,[j1 j2 j3 j4])))];%vector that keeps the signs of the subdeterminants of Mperp
      endfor %j4
    endfor %j3
  endfor %j2
endfor %j1
signs_sigma=signsBperp.*signsMperp;
i2=find(signs_sigma);
sigma0=signs_sigma(i2);%we keep in this vector the nonzero products of derterminants, and then we check if there are two with different sign:
mixed_cond=0;
for i=1:length(sigma0)-1
    if sigma0(i)*sigma0(i+1)==-1
        mixed_cond=1;
        break
    endif
endfor