Re: periodic function
- To: mathgroup at smc.vnet.net
- Subject: [mg4085] Re: periodic function
- From: wagner at motel6.cs.colorado.edu (Dave Wagner)
- Date: Fri, 31 May 1996 01:36:11 -0400
- Organization: University of Colorado, Boulder
- Sender: owner-wri-mathgroup at wolfram.com
In article <4obep3$na9 at dragonfly.wolfram.com>,
Michel GOSSE <101632.1565 at CompuServe.COM> wrote:
>I want to plot with Mathematica a periodic fonction. I would like
>to give the expression between 0 and T (the period) and then use a
>command like plot(f,{x,a,b}) and the function will plot directly.
>Is it possible ?
You should be able to make a definition like this:
f[t_] := whatever /; 0 <= t < T
f[t_] := f[Mod[t, T]]
The second rule will be used only when t is outside the range 0..T.
Dave Wagner
Principia Consulting
(303) 786-8371
dbwagner at princon.com
http://www.princon.com/princon
==== [MESSAGE SEPARATOR] ====