%filters data and plots cross spectral density for 64 electrode array
%requires raw data and sampling frequency

function [data] = PlotCrossSpecDens(wave);

%waveFilt = BudapestbandPass(wave,1000,5,200);
% SHOULDN'T HAVE FULL 1000 POINTS IN XSD - SHOULD ONLY BE 200 - 700
% !!!!!!!!!!!!
figure
[waveXSD,f] = csd(wave(1:131,35),wave(1:131,35),256,1000);
plot(f, waveXSD); axis([0 100 0 0.002]); 
figure
for n=1:64
[waveXSD,f] = csd(wave(1:131,n),wave(1:131,35),256,1000);
subplot(8,8,n); plot(f, waveXSD); axis([0 50 0 0.002]); axis off;
end