close all

PistonVel = [0 diff(PistonDistance)./diff(time)];

figure
ah1 = subplot(5,1,1)
plot(time-time(1),abs(PistonVel))
ah2 = subplot(5,1,2)
plot(time-time(1),LatchingControllerState)

ah3 = subplot(5,1,3)
plot(time-time(1),RectifiedVoltage)
ah4 = subplot(5,1,4)
plot(time-time(1),RectifiedVoltage.*RectifiedCurrent)

ah5 = subplot(5,1,5)

plot(time-time(1),(BuoyDepthPressure-mean(BuoyDepthPressure))/1.5)

linkaxes([ah1 ah2 ah3 ah4 ah5],'x');

