The sawtooth(t,w) function produces a triangular periodic waveform with 2*pi wavelength and amplitude between +/- 1.
The optional w (width) parameter is a fractional value that provides the location of the peak in the 2*pi period. If w = 1, the classic sawtooth that ramps from -1 to 1 over the full period and drops immediately to -1 on the first sample of the next period is generated. When w = 0.5, the sawtooth waveform ramps up in the same way but peaks at half the period, then ramps back down in a classic triangle wave. When w = 0.25, the sawtooth waveform peaks at one quarter of the period, and so on.