close all

PistonVel = [0 diff(PistonDistance)./diff(time)];

figure
ah1 = subplot(,1,1)
plot(time-time(1),PistonVel)
ah2 = subplot(4,1,2)
plot(time-time(1),LatchingControllerState)

ah3 = subplot(4,1,3)
plot(time-time(1),RectifiedVoltage)
ah4 = subplot(4,1,4)
plot(time-time(1),RectifiedVoltage.*RectifiedCurrent)

linkaxes([ah1 ah2 ah3 ah4],'x');

