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