MathGroup Archive 2002

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

Search the Archive

Re: arguments of the function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35424] Re: [mg35402] arguments of the function
  • From: BobHanlon at aol.com
  • Date: Fri, 12 Jul 2002 04:28:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 7/11/02 6:24:43 AM, eleri111 at hot.ee writes:

>I am using Mathematica 4.0
>I can't find a function that would find arguments of the function.
>For example I have an equation: 
>y[t+3]=a1* Cos[Sin[u[t+2]]]/Tan[u[t+1]]-Cot[u[t+3]]+a2
>
>and I would like to get those argumets u[t+3], u[t+2], u[t+1]
>and give them new values
>for example:
>
>x1=u[t+3]
>x2=u[t+2]
>x3=u[t+1]
>
>and then print that equation with new values:
>y[t+3]=a1* Cos[Sin[x2]]/Tan[x3]-Cot[x1]+a2
>
>Can you tell me how to do that?
>

y[t+3]==a1*Cos[Sin[u[t+2]]]/Tan[u[t+1]]-Cot[u[t+3]]+a2;

% /. u[t+n_] :> ToExpression["x"<>ToString[4-n]]

y[3+t]==a2-Cot[x1]+a1 Cos[Sin[x2]] Cot[x3]

"y[t+3]=a1*Cos[Sin[u[t+2]]]/Tan[u[t+1]]-Cot[u[t+3]]+a2";

StringReplace[%, Evaluate[Table[
      ("u[t+"<>ToString[n]<>"]") -> ("x"<>ToString[4-n]),
      {n,3}]]]

y[t+3]=a1*Cos[Sin[x2]]/Tan[x3]-Cot[x1]+a2


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Problem with image import
  • Next by Date: Re: Graphics Question
  • Previous by thread: Re: arguments of the function
  • Next by thread: Re: arguments of the function