MathGroup Archive 2005

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

Search the Archive

Question regarding procedures

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63422] Question regarding procedures
  • From: Dew 001 <dewdrops001 at gmail.com>
  • Date: Fri, 30 Dec 2005 02:32:37 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
I am relatively new to Mathematica and have the following question:
I created a procedure where the value of fitn_ comes from the user ...

create [fitn_]:=Module[{func },
func[{x_}]:=Evaluate[fitn];
Print[func[{3}]];
]

And called it with the following command:
create[x^2]

I was hoping to get a 9 .. and if create[x^3] is entered I hoped to get back
27.

Any ideas?

Thanks very much



  • Prev by Date: Re: and Adding matrices for use in NDSolve input
  • Next by Date: Palette Problem
  • Previous by thread: Re: and Adding matrices for use in NDSolve input
  • Next by thread: Re: Question regarding procedures