index=find(power.time>=0);

subplot(2,1,2)

plot(power.time(index),abs(power.signals.values(index)-reference.signals.values(index)))
xlabel('Time, s'), ylabel('Power, W')
title('Absolute deviation from reference')


subplot(2,1,1)

plot(power.time(index),power.signals.values(index),reference.time(index),reference.signals.values(index))
legend('Power output','Reference signal')
xlabel('Time, s'), ylabel('Power, W')
