MathGroup Archive 2001

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

Search the Archive

Re: clever way to do a product?

  • To: mathgroup at
  • Subject: [mg27179] Re: clever way to do a product?
  • From: Yossi Lonke <jrl16 at>
  • Date: Fri, 9 Feb 2001 03:10:24 -0500 (EST)
  • Organization: Case Western Reserve University, Cleveland, OH, USA
  • References: <95tqsr$>
  • Sender: owner-wri-mathgroup at

> From: "Tim Ebringer" <drearyslig at>
To: mathgroup at
> Organization: Computer Science, University of Melbourne
> Newsgroups: comp.soft-sys.math.mathematica
> Date: 8 Feb 2001 05:03:07 -0500
> Subject: [mg27179] clever way to do a product?
> 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.
I don't know about clever, but you may try:

Apply[Times, Delete[your_list, {j}]]

So you could define a function of a list and an index:

f[your_list_, j_] := Apply[Times, Delete[your_list, {j}]]

Best Regards,

Yossi Lonke

  • Prev by Date: ReadList
  • Next by Date: Re: Determine the "value range" of a function
  • Previous by thread: Re: clever way to do a product?
  • Next by thread: Plotting Intersecting Planes