Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: setting discrete values for a function -- newbie

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97627] Re: setting discrete values for a function -- newbie
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 17 Mar 2009 05:00:26 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <gpld42$qj5$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

(f[#] = 0 ) & /@ {a, b, c}

will not do it ??

Regards
   Jens

Karsten W. wrote:
> Hello,
> 
> my task is to set some function values f[[a], f[b], ... to zero. Is
> there a nicer way to do this than this one:
> 
> Clear[f];
> args = Partition[{a,b,c}, 1];
> Apply[(f[#] = 0 )&, args, {1}];
> 
> Especially, can I avoid calling Partition?
> 
> 
> Best wishes,
> Karsten.
> 


  • Prev by Date: Selecting left hand sides from assignments
  • Next by Date: Re: setting discrete values for a function -- newbie
  • Previous by thread: Re: setting discrete values for a function -- newbie
  • Next by thread: Re: setting discrete values for a function -- newbie