MathGroup Archive 2003

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

Search the Archive

Re: A short question about SetDelayed[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42516] Re: [mg42499] A short question about SetDelayed[]
  • From: Dr Bob <drbob at bigfoot.com>
  • Date: Sat, 12 Jul 2003 05:19:14 -0400 (EDT)
  • Organization: Space Corps
  • References: <200307110658.CAA17205@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

f[i_Integer]:=g[i,x]

Bobby

On Fri, 11 Jul 2003 02:58:01 -0400 (EDT), Vadym Kulik 
<kulik_nospam at umn.edu> wrote:

> 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
>
>
>



-- 
majort at cox-internet.com
Bobby R. Treat


  • Prev by Date: Movies
  • Next by Date: Re: automational generating of filenames (involving numbers)
  • Previous by thread: A short question about SetDelayed[]
  • Next by thread: Re: A short question about SetDelayed[]