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

function [data] = PlotPowerSpec1( wave);

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

%wavefft = fft(waveFilt);
wavemag = abs(fft(waveFilt,2048));

%wavemag(1,:)=0;
f = (1000*(0:1023)/2048);

figure
for n=1:4
subplot(4,1,n); plot(f, wavemag(1:1024,n)); axis([0 50 0 50]); %axis off;
[C(n),I(n)]=max(wavemag(:,n));
end
CA3amp=(C)
freq=(I)

