Re: Is it possible to impose a condition on an iterator
- To: mathgroup at smc.vnet.net
- Subject: [mg101582] Re: [mg101499] Is it possible to impose a condition on an iterator
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Fri, 10 Jul 2009 06:48:41 -0400 (EDT)
- References: <200907090552.BAA16854@smc.vnet.net>
Hello Mauro, On Thu, 9 Jul 2009, Mauro wrote: > I would like to perform a summation of this type, > > Sum[a^2 - 3 a/(4 a^2), {a, 1, 20}] > > excluding however some values of the iteratore, I would for instance > like to exclude the values than to greater of 6 and inferior to 12. Is > it possible? > > Thanks > > how about: f[a_] := If[6 <= a <= 12, 0, a^2 - 3 a/(4 a^2)] Sum[f[a], {a, 1, 20}] === Sum[a^2 - 3 a/(4 a^2), {a, 1, 5}] + Sum[a^2 - 3 a/(4 a^2), {a, 13, 20}] Oliver
- References:
- Is it possible to impose a condition on an iterator of the summation ?
- From: Mauro <mauro@NONOyahoo.com>
- Is it possible to impose a condition on an iterator of the summation ?