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

function [f] = PlotCohere7Ch( wave );

waveFilt = BudapestbandPass(wave,1000,10,40,1000);


%figure
%[waveCohere,f] = cohere(waveFilt(1:1000,8),waveFilt(1:1000,2),256,1000);
%plot(f, waveCohere); axis([0 50 0 1]); 
figure
for n=1:5
[waveCohere,f] = cohere(waveFilt(1:1000,n),waveFilt(1:1000,5),256,1000);
subplot(5,1,n); plot(f, waveCohere); axis([0 50 0 1]); %axis off;
[C(n),I(n)]=max(waveCohere);
end
amp=(C)
freq=(I)

