Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11679

Re: Sum command

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Sum command
Date 2012-09-09 09:11 +0000
Message-ID <k2hmgt$ptm$1@smc.vnet.net> (permalink)
References <20120908070808.4AD8D683B@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


iSum[expr_,
  {x_Symbol, xmin_, xmax_, xstep_Integer: 1}] :=
 Sum[expr, {x, Ceiling[xmin], Floor[xmax], xstep}]


iSum[f[i], {i, 7/2, 4}]

f[4]


iSum[f[i], {i, 3/2, 2}]

f[2]


iSum[f[i], {i, 1/2, 9/2}]

f[1] + f[2] + f[3] + f[4]


iSum[f[i], {i, 1/2, 9/2, 2}]

f[1] + f[3]


Bob Hanlon


On Sat, Sep 8, 2012 at 3:08 AM, Rodrigo AP <digorna@gmail.com> wrote:
>
> Dear group,
>
> How could I get: Sum[f[i],{i,7/2,4}]=f[4] or   Sum[f[i],{i,3/2,2}]=f[2] ? I
> mean, I want the iterator running over the integers only ...
>
> Regards
>
> --
> Rodrigo
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Sum command Bob Hanlon <hanlonr357@gmail.com> - 2012-09-09 09:11 +0000

csiph-web