I have this simple graph :

I want to write this graph in this form :
f(t)= {1, if .... and 2, if ...} I can't fill these spaces, I can't come to a solution for this no matter how I try. Can you write the equation of this graph? Thanks.
I have this simple graph :

I want to write this graph in this form :
f(t)= {1, if .... and 2, if ...} I can't fill these spaces, I can't come to a solution for this no matter how I try. Can you write the equation of this graph? Thanks.
Use some version of $$\lfloor \sin(a \cdot t+b)+c \rfloor$$ Where $\lfloor x \rfloor$ is the floor function and a,b, and c are constants. You can integrate this piecewise to find the area under the graph. By the way, your graph is referred to as a square wave.