Creating sinusoidal motion in DriftDemo2

Hello all,

I was hoping to edit DriftDemo2 so that the grating drifts forwards and backwards sinusoidally, rather than continuously drifting in one direction.

However, I do not understand how to do this (I am new to psychtoolbox and programming more generally).. would anyone be able to give me a pointer?

Kind regards,
Steven