Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: how to make conditional summation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55593] Re: how to make conditional summation
  • From: D Herring <dherring at at.uiuc.dot.edu>
  • Date: Wed, 30 Mar 2005 03:22:30 -0500 (EST)
  • References: <d2b4ki$76i$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Xun,

> Say, Sum[f[m],{m,-N,N}] with N != 0
> Any suggestions?

Maybe something like
Sum[If[m==0,0,f[m]], {m,-N,N}]
?

For example,
Sum[If[m==0, 0, 1/m^2], {m, -100, 100}]
would ordinarily fail at m==0.

Later,
Daniel


  • Prev by Date: Re: Position function
  • Next by Date: exploded plots
  • Previous by thread: Re: how to make conditional summation
  • Next by thread: Re: how to make conditional summation