%BIG RED
%function to plot RAW data, with and without zeroing
%with respect to ambient signal
function [n]=plotRaw(data)

tStep=data(2,1)-data(1,1);
n=size(data,2);
pPorts=n-1;
time=data(:,1);
pData=data(:,2:n);
probeNames={'probe1' 'probe2' 'probe3' 'probe4' 'probe5' 'probe6'...
    'probe7' 'probe8' 'probe9' 'probe10' 'probe11' 'probe12'};

%subtract offset from signal at each probe
tAmbient=.1; %seconds from start with ambient conditions
pDataAmbient=pData(1:tAmbient/tStep,:);
pAmbient=mean(pDataAmbient);
pDataZeroed=bsxfun(@minus,pData,pAmbient);

% %plot raw pressure from all probes wrt time
% figure()
% plot(time,pData(:,1:pPorts))
% title('Pressure Sensor Signals')
% xlabel('time (s)')
% ylabel('sensor signal (V)')
% legend(probeNames);

% plot zeroed raw pressure from all probes wrt time
% zeroed=mean of first tAmbient seconds subtracted out

figure()
plot(time,pDataZeroed(:,1:8))
title('Pressure Sensor Signals (zeroed)')
xlabel('time (s)')
ylabel('sensor signal (V)')
legend(probeNames)
end