%filters data and plots power spectrum for 64 electrode array
%requires raw data and sampling frequency

function [data] = PlotCohere4( wave, S );

waveFilt = BudapestbandPass(wave,1000,5,200);

transverse=1:64;
reshape(transverse,8,8);
transverse=reshape(transverse',1,64);

figure
[waveCohere,f] = cohere(waveFilt(1:1000,28),waveFilt(1:1000,28),256,1000);
plot(f, waveCohere); axis([0 100 0 1]); 
figure
for n=1:64
[waveCohere,f] = cohere(waveFilt(1:1000,n+1),waveFilt(1:1000,28),256,1000);
subplot(8,8,transverse(n)); plot(f, waveCohere); axis([0 50 0 1]); axis off;
end
