a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by Cedar

You briefly touched on the harmonics on the wave that is being generated and it reminded me of something from my college days, where we learnt about square waves and 'overshoot' or 'bounce'.

It was an interesting lesson I have mostly forgotten now, but I was interested in the 'Odd Harmonics' aspect and I wanted to see what that looked like. So naturally I opened Excel and in time-honored tradition of misuse, I made a graph. The below formula is pretty simple and you just copy it along and down as appropriate, the square wave is the sum of all of these:

It gets far more interesting when you make it more granular -- lower increment of x, more odd harmonics... here's 501 harmonics with x increasing by 1:





Devac  ·  1398 days ago  ·  link  ·  

Here's Wolfram Alpha.

  Plot[Sum[Sin[n*x]/n, {n, 1, 5, 2}], {x, 0, 2Pi}]

{n, 1, 5, 2} in Sum means "sum over n from 1 to 5, incrementing n by 2". You can plug pretty much any functions and values. WA is pretty limited but you can still have fun with it.

Cedar  ·  1398 days ago  ·  link  ·  

Thanks Devac, that's neat; Wolfram is the must nicer choice but this was 2 years before it launched :).