Topic: Help with function

Hello guys can anyone tell me the fuction for square pulse?I need a simple square pulse that goes from -2 to +2 with f=1hz.I dont know much about the program(or math for that matter) so please tell me as simple as possible
Thanks.

Re: Help with function

One way is to use the modulus function like this: f(x)=if(mod(x, 1) < 0.5, -2, 2)