Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*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 2003

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

Search the Archive

Re: question..

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43874] Re: [mg43833] question..
  • From: YAT <yat at omrf.ouhsc.edu>
  • Date: Thu, 9 Oct 2003 01:55:21 -0400 (EDT)
  • References: <200310080847.EAA26277@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

For equally spaced intervals such as summing over every odd element;

Plus@@Take[Range[100],{1,100,2}]

or

Plus@@Part[Range[100],Range[1,100,2]]

Yas

Ghassan Shahin wrote:
> Hi..
> I have a simple question..
> i want to use mathematica for sums..but i need to sum from 1 to 100 
> except same integer numbers, say 2,6,8..what is the code for such a 
> task?
> 
> thank you
> 


  • References:
    • question..
      • From: "Ghassan Shahin" <ghassans@bethlehem.edu>
  • Prev by Date: Re: question..
  • Next by Date: $CommandLine
  • Previous by thread: question..
  • Next by thread: Re: question..