function PDCtest2(PDC,E,channels)
    
for j=1:E                                                                   % For each epoch...
    for i=1:channels                                                        % and each data array..
        s = sum(PDC{j}(:,i,:).^2,1);                                        % calculate the sum of PDC coefficients of each source
        s = round(s*10^5)/10^5;                                             % keep its first 5 decimal points
        if any(s~=1)==1                                                     % and if this sum is not equal to 1
            error('Errors in the computation of PDC were detected!')        % then stop.
        end
    end
end

disp('Second PDC test did not reveal any computational errors')
clear s