MathGroup Archive 2001

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

Search the Archive

Re: clever way to do a product?



> From: "Tim Ebringer" <drearyslig at hotmail.com>
To: mathgroup at smc.vnet.net
> 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