I've been trying to construct a triangular waveform using excel. This is part of an assignemnt i'm doing, in which i've already constructed a squarewave and sawtooth waveform.

The formula i've been using to try and create this triangular wave is shown below:-

v= Vsin(wt)+ v/9sin(3wt-pi)+V/25sin(5wt-pi)...... and so on.

I'm pretty sure this is wrong as i've read that alternate odd harmonics must be in antipahse with the fundamental.

Can someone please provide a sensible formula for creating a triangular wave, i've looked on the net but there isn't much information!!

Thanks

Matt