MathGroup Archive 1999

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

Search the Archive

Re: Modulus Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16551] Re: Modulus Question
  • From: "Dale Horton" <daleh>
  • Date: Tue, 16 Mar 1999 04:00:22 -0500
  • Organization: Wolfram Research, Inc.
  • References: <7c5c7i$7so@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Try

xnew[t_] := Mod[x[t],2*Pi]

This delays the Mod operation until xnew is evaluated (which will work if a
numerical
t value is supplied, as in ParametricPlot3D).

-Dale

Guy Gilliland wrote in message <7c5c7i$7so at smc.vnet.net>...
>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: Interpolation of 3D data problem
  • Next by Date: Re: Can't open notebook
  • Previous by thread: Re: Modulus Question
  • Next by thread: Re: Modulus Question