Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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