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

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

%waveFilt = BudapestbandPass(wave(:,2:8),1000,5,200);
waveFilt = BudapestbandPass(wave(:,1:7),8.865248e8,3,60);
time=wave(1:end,8);

%Lrotate=ones(8,8);
%for m=1:8
 %   for n=1:8
  %      Lrotate(m,n)=n*8-m+1;
  % end
  %end
%Lrotate=reshape(Lrotate,1,64);

%Rrotate=ones(8,8);
%for n=1:8
 %   for m=1:8
  %      Rrotate(m,n)=8*(8-m)+n
  % end
  %end
%Rrotate=reshape(Rrotate,1,64);

figure
plot(time, waveFilt(:,2)); axis([-0.02 0.18 -0.0001 0.0001]); 
figure
for n=1:7 
subplot(7,1,n); plot(time, waveFilt(:,n)); 
axis([-0.02 0.18 -0.0001 0.0001]);
end
figure
plot(phase, waveFilt(:,2)); axis([-0.02 0.18 -0.0001 0.0001]); 
figure
for n=1:7 
subplot(7,1,n); plot(time, waveFilt(:,n)); 
axis([-0.02 0.18 -0.0001 0.0001]);
end