I had posted a portion of this a couple of days ago but
thought I would post the rest in case it might be useful. I hope
all the code gets attached. It is helpful for demonstrating the
effects of harmonic content in a power system on the sine wave. The
individual harmonic percentages are expressed as a percentage of
the fundamental (sine wave). I am attaching the script in parts
because Attach Code will not let me attach it all in one go.