MathGroup Archive 2001

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

Search the Archive

Re: clever way to do a product?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27192] Re: clever way to do a product?
  • From: Brian Higgins <bghiggins at ucdavis.edu>
  • Date: Fri, 9 Feb 2001 03:10:37 -0500 (EST)
  • References: <95tqsr$mb3@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Tim, Here is one way:

result[j_, n_] := Product[i + x, {i, 1, j - 1}]Product[i + x, {i, j + 1, n}]

In[10]:=result[4, 6]

Out[10]=(1 + x) (2 + x) (3 + x) (5 + x) (6 + x)

cheers,

Brian


In article <95tqsr$mb3 at smc.vnet.net>,
  "Tim Ebringer" <drearyslig at hotmail.com> wrote:
> Does anyone know of a clever way where I can calculate a
product, where i
> runs from 1 to n, except where i=j?
>
> Tim.
>
>


Sent via Deja.com
http://www.deja.com/


  • Prev by Date: Re: Plotting Intersecting Planes
  • Next by Date: ReadList
  • Previous by thread: Re: clever way to do a product?
  • Next by thread: Re: clever way to do a product?