MathGroup Archive 2007

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

Search the Archive

Assign variables to a module

  • To: mathgroup at
  • Subject: [mg83524] Assign variables to a module
  • From: Frank Deicke <frankdeicke at>
  • Date: Thu, 22 Nov 2007 04:45:26 -0500 (EST)

I want to assign different variables to a module. One variable could be 
a term. Now it could be possible, that the term includes the same 
variables like I want to assign to the module. Please look at the simple 
  example below.

f = x + y;
Test[c_,x_, y_, f_] := Module[
     result = c*f;(*do something using f*)


Is there any possibility that within the module, the variables x and y 
of f could be replaced by the values assigned to the module (x_,y_)? 
Finally, the result should be 2 and not x+y.


  • Prev by Date: Re: Get list of function variables?
  • Next by Date: Re: PolarPlot
  • Previous by thread: Re: How can I find roots in Mathematica 6?
  • Next by thread: Re: Assign variables to a module