%
%  file for plotting output and getting average amplitudes
%
index = floor(length(time)/2);
subplot(2,1,1); plot(time(index:end),x1(index:end)); grid;
title(['Average Amplitude (Cart 1) is ' num2str(0.5*(max(x1(index:end))-min(x1(index:end))))]);
subplot(2,1,2); plot(time(index:end),x2(index:end)); grid;
title(['Average Amplitude (Cart 2) is ' num2str(0.5*(max(x2(index:end))-min(x2(index:end))))]);