Can't make function periodic for t<0
- To: mathgroup at smc.vnet.net
- Subject: [mg119318] Can't make function periodic for t<0
- From: yitzhakbg <yitzhakbg at gmail.com>
- Date: Mon, 30 May 2011 06:35:39 -0400 (EDT)
- Reply-to: comp.soft-sys.math.mathematica at googlegroups.com
This is the function to make periodic:
x[t_] := Piecewise[{{-1, -1/2 <= t < 0}, {1, 0 <= t < 1/2}}]
I saw DH's lovely post from 1/14/09:
"if we want some function f to have period L we may define an operator:
makeper[f_,L_]= f[Mod[#,L]]&
Here is an example. We want a sine with period 1:
sin1= makeper[Sin,1]"
I can't get it to work for t<0 because Mod always returns positive values.
Can anyone kindly help?
Yitzhak