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: Skipping Elements in Sum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61200] Re: Skipping Elements in Sum
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Wed, 12 Oct 2005 01:43:13 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 10/11/05 at 3:22 AM, fateman at eecs.berkeley.edu (Richard J.
Fateman) wrote:

>Sum[a[i],{i,low,j-1}]+Sum[a[i],{i,j+1,high}] may be far more useful
>in many ways, since you can tell how many elements there are:    if
>low<j<high then  high-low else high-low+1  and other useful
>symbolic info.

>Symbolically manipulating objects with holes shot in them with
>Delta functions is not so easy or reliable.

If there is only one hole there should be no difficulty. But yes, if there are multiple holes, using delta functions almost certain not be the best approach.

>If all you want to do is add them, you can use a For loop and
>subtract the excluded elements, but that's not what you asked.

While this will work within Mathematica, it is generally not a good choice since the execution time of For loops in Mathematica is generally significantly greater than other methods.

>You could try asking a more specific question about what you really
>want to do with Sum. RJF

Your comments before this one seemed to be addressed to me (at least you seemed to be responding to my post). But this last comment seems to be addressed to the original poster. Your posting style (top posting) makes your intent ambiguous.

However, if this last was intended for me I will point out my the last comment in my post to which you are responding said essentially the same thing.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Maximum y-value in a list of xy pairs
  • Next by Date: Re: Mathematica output that slow???
  • Previous by thread: Re: Re: Skipping Elements in Sum
  • Next by thread: show only very second or third tick