%plots power spectrum 
%requires raw data and sampling frequency

function [f] = PlotPowerSpecLFP( wave );

%waveFilt = BudapestbandPass(wave,1000,0.1,45,1000);
%wavemag = abs(fft(waveFilt,2048));
wavemag = abs(fft(wave,2048));
f = (1000*(0:1023)/2048);



figure
plot(f, wavemag(1:1024)); axis([0 60 0 20000]);  xlabel ('Frequency (Hz)'); ylabel ('Magnitude');
[C,I]=max(wavemag)
