MathGroup Archive 1999

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

Search the Archive

Re: Modulus Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16520] Re: [mg16396] Modulus Question
  • From: Jurgen Tischer <jtischer at col2.telecom.com.co>
  • Date: Tue, 16 Mar 1999 04:00:00 -0500
  • Organization: Universidad del Valle
  • References: <199903110716.CAA12372@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Guy,

x[t_]=Mod[x[t],2\[Pi]]/.First[soln]

Jurgen

Guy Gilliland wrote:
> 
> I am trying to take the modulus of a function and am having difficulty.
> The following is my code:
> 
> soln=NDSolve[{x'[t]==y[t],x[0]==0.4,
>       y'[t]==-gamma1 * y[t] - Sin[x[t]] + A1 * Cos[z[t]],
> y[0]==1.2,z'[t]==w,
>       z[0]==0},{x,y,z},{t,0,1500},MaxSteps\[Rule]50000]
> 
> Before I do a parametric plot, I want to do the following:
> 
> x[t] = x[t] Mod 2*pi    (* limit x to belong to interval from 0 to 2*pi
> 
> I don't know how to do this.  Using the Mod function gives recursion
> errors (i.e., Mod[x[t],2*pi] doesnt' work).
> 
> Thanks in advance for your assistance.  Please email me at
> guy20 at wharton.upenn.edu
> 
> Guy Gilliland



  • Prev by Date: Re: planar polygon plot 2
  • Next by Date: Re: Q: extracting list of arguments of function
  • Previous by thread: Modulus Question
  • Next by thread: Re: Modulus Question