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


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

Re: Sum command

From Rodrigo AP <digorna@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Sum command
Date 2012-09-11 07:04 +0000
Message-ID <k2mnpn$54b$1@smc.vnet.net> (permalink)
References <20120908070808.4AD8D683B@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Thanks a lot, Bob!

2012/9/8 Bob Hanlon <hanlonr357@gmail.com>

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



-- 
Rodrigo

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


Thread

Re: Sum command Rodrigo AP <digorna@gmail.com> - 2012-09-11 07:04 +0000

csiph-web