Dr.Peterson
Elite Member
- Joined
- Nov 12, 2017
- Messages
- 16,722
That's good. The one I had in mind was a modification of these, which avoid the trig:
But your choice is up to you.
A square wave can also be generated using the floor function directly:
[imath]{\displaystyle x(t)=2\left(2\lfloor ft\rfloor -\lfloor 2ft\rfloor \right)+1}[/imath]
and indirectly:
[imath]{\displaystyle x(t)=\left(-1\right)^{\lfloor 2ft\rfloor }.}[/imath]
But your choice is up to you.