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