%idx = find(RectifiedVoltage > 155);
idx = 1:length(RectifiedVoltage);

figure('Position',[1600 30 1594 1103])
ah1 = subplot(4,1,1)
plot(time(idx)-time(1),RectifiedVoltage(idx),'-x')
ylabel('Rectified Voltage');

ah2 = subplot(4,1,2)
plot(time(idx)-time(1),ConvertedCurrent(idx),'-x')
ylabel('Converted Current');

ah3 = subplot(4,1,3)
plot(time(idx)-time(1),BatteryVoltage(idx),'-x')
ylabel('Battery Voltage');

ah4 = subplot(4,1,4)
plot(time(idx)-time(1),RectifiedCurrent(idx)-ConvertedCurrent(idx),'-x')
ylabel('Load Dump Current');

linkaxes([ah1 ah2 ah3 ah4],'x');

figure('Position',[1600 30 1594 1103])
plot(RectifiedVoltage,ConvertedCurrent,'x')
xlabel('Rectified Voltage');
ylabel('Converted Current');



idx = find((ConvertedCurrent < .2) & (RectifiedVoltage<150) & (RectifiedVoltage>40));  %Find instances where converters are off


figure
ah1 = subplot(2,1,1)
plot(time-time(1),RectifiedVoltage,time(idx)-time(1),RectifiedVoltage(idx),[0 time(end)-time(1)],[35 35],'r-')
ah2 = subplot(2,1,2)
plot(time-time(1),ConvertedCurrent);
linkaxes([ah1 ah2],'x');
