* Mel:
Alf P. Steinbach wrote:
* Steve Holden:
It's not clear to me that you can approximate any waveform with a
suitable combination of square waves,
Oh. It's simple to prove. At least conceptually! :-)
Consider first that you need an infinite number of sine waves to create a
perfect square wave.
The opposite also holds: infinite number of square waves to create a
perfect sine wave (in a way sines and squares are opposites, the most
incompatible).
No, it doesn't. The infinite set of sine waves that make a square wave
leave out the sine waves of frequency 2f, 4f, 6f, 8f, ... (2*n*f) ... .
Once you've left them out, you can never get them back. So sawtooth waves,
for example, can't generally be built out of sets of square waves.
The way to build a sine wave out of square waves is not a Fourier transform.
See the post you replied to for a simple procedure to build the sine wave.
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list