MathGroup Archive 2005

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

Search the Archive

Question regarding procedures


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