function [Error]=comparison_plot_sincos(reference,comparison,figure_number,textstring)
%

%   Copyright 2020 The MathWorks, Inc.
v=1:min(length(reference),length(comparison));
reference=reference(v);
comparison=comparison(v);

% Need to remove errors of 2*pi+delta and map to delta
Error=(reference-comparison);
figure(figure_number)
hold on
plot(reference,'b');
plot(Error,'r');
hold off
legend('Reference','Error')
grid on
title(textstring)

fprintf('Maximum Error %s %d \n',textstring,max(abs(Error)))