function y = addBackground(y,t)
% Add a constant sinusoidal background at a fixed, low frequency, which is
% a fraction of the max value of the signal.

% Frequency in Hz of the background sine-wave.
bkgFrequency = 3;

% Fraction of background signal with respect to the underlying signal.
bkgFraction = 0.3;
bkgLevel = bkgFraction * max(y);

y = y(:)' + bkgLevel*sin(2*pi*bkgFrequency*t);
end