function [SCN,DF] = SC(x,Fs)

% Spectral Concentration

[Paa,Faa] = pwelch(x,[],[],[],Fs);
Istart = find(Faa<4,1,'last');
I = find((Faa >= 4) & (Faa <= 12));
[~,In] = max(Paa(I));
DFpos = In + Istart;

Ir = find((Faa >= 0.82*Faa(DFpos) & (Faa <= 1.17*Faa(DFpos))));
SCN = sum(Paa(Ir))/sum(Paa);
DF = Faa(DFpos);

