UnitStep
- To: mathgroup at smc.vnet.net
- Subject: [mg40094] UnitStep
- From: guillerm at aida.usal.es (Guillermo Sanchez)
- Date: Thu, 20 Mar 2003 03:32:57 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Dear friend, I want build a function where f(t) = 1 in intervals {{0, d}, {a +d , a + 2 d}, {2 a+2 d, 2 a + 3 d}, {3 a + 3d, 3 a + 4 d}, ...{(n-1) (a+d) , (n-1) a + n d}} and f(t) = 0 in intervals {{d, a+d}, {a + 2 d, 2 a + 2 d}, {2 a + 3 d, 3 a + 3d}, ....,{(n-1) a + n d, n a + n d}} I apply UnipStep as follow f[j_, a_, d_] := UnitStep[Product[t - n*(a + d), {n, 0, j + 1}]*Product[t - (n*(a + d) + d), {n, 0, j}]] But I suposse anyone will be a better idea. Guillermo