MathGroup Archive 2001

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

Search the Archive

Re: clever way to do a product?


It am not sure if it deserves to be called "clever" but it is probably the
most obvious:

In[4]:=
Product[If[i != j,x[i]-x[j],1],{i,1,2},{j,1,2}]//Expand
Out[4]=
     2                     2
-x[1]  + 2 x[1] x[2] - x[2]



on 01.2.8 6:40 PM, Tim Ebringer at 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.
> 
> 
> 
> 

-- 
Andrzej Kozlowski
Toyama International University
JAPAN

http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/



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