Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: UnitStep

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40112] Re: UnitStep
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Fri, 21 Mar 2003 02:36:31 -0500 (EST)
  • References: <b5bjhi$5r7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

f[t_, a_, d_] := 1 - UnitStep[Mod[t, a+d] - d];

Plot[f[t, 1, 2], {t, 0, 10}];


Bob Hanlon

In article <b5bjhi$5r7$1 at smc.vnet.net>, guillerm at aida.usal.es (Guillermo
Sanchez) wrote:

<< 
Subject:	UnitStep
From:		guillerm at aida.usal.es (Guillermo Sanchez)
To: mathgroup at smc.vnet.net
Date:		Thu, 20 Mar 2003 05:28:18 +0000 (UTC)

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






 >><BR><BR>


  • Prev by Date: Re: Finding solutions to differential eqns
  • Next by Date: Re: simple question if/while loop
  • Previous by thread: UnitStep
  • Next by thread: Limiting the results