MathGroup Archive 2005

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

Search the Archive

Re: How to define and plot a periodic signal?


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?