MathGroup Archive 2003

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

Search the Archive

A short question about SetDelayed[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42499] A short question about SetDelayed[]
  • From: "Vadym Kulik" <kulik_nospam at umn.edu>
  • Date: Fri, 11 Jul 2003 02:58:01 -0400 (EDT)
  • Organization: University of Minnesota, Twin Cities Campus
  • Sender: owner-wri-mathgroup at wolfram.com

Hi guys:

I work with Mathematica for 2 weeks and now I'm really stuck with the
following problem:

I'd like to generate an array of functions by the rule f[i]:=g[i,x], where x
stands for arguments some of which have been assigned numerical values; i is
an index, so that f[1]:=g[1,x], etc.

Unfortunately, the following code doesn't work
x = 5;   Do[f[i] := g[i, x], {i, 10}]

... neithes does this
x = 5;   Do[f[i] := g[Evaluate[i], x], {i, 10}]

Any help?

Thanks,
Vadym



  • Prev by Date: Re: NDSolve: Precision and Stability
  • Next by Date: Re: find root
  • Previous by thread: Re: Integrating a function over a polygon
  • Next by thread: Re: A short question about SetDelayed[]