MathGroup Archive 2005

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

Search the Archive

Re: How to define and plot a periodic signal?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62576] Re: How to define and plot a periodic signal?
  • From: Peter Pein <petsie at dordos.net>
  • Date: Tue, 29 Nov 2005 04:44:06 -0500 (EST)
  • References: <dme6e3$i4l$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

aza schrieb:
> Hello,
> 
> I need to define a function that is a single triangular pulse repeated
> periodically. How could I define this function and plot it?
> 
> Thanks
> 
Hi aza,

triangularPulse[x_, period_:2*Pi, lo_:0, up_:1] :=
  Rescale[Abs[Mod[x, period, -period/2]], {0, period/2}, {lo, up}]

gives you a pulse with period p and values ranging from lo to up.

Regards,
   Peter


  • Prev by Date: function of a function
  • Next by Date: Re: does this shut down anyone else's kernel?
  • Previous by thread: Re: How to define and plot a periodic signal?
  • Next by thread: Re: How to define and plot a periodic signal?