Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

2X2 arrays

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74630] 2X2 arrays
  • From: simad at cse.iitkgp.ernet.in
  • Date: Thu, 29 Mar 2007 02:28:31 -0500 (EST)
  • Reply-to: <simad at cse.iitkgp.ernet.in>

Hi,

I am wondering how to initialize a set of 2X2 arrays in an array.
for example: 
a1=1/Sqrt[2]{{1,1},{1,-1}}
a2=1/Sqrt[2]{{1,0},{0,1}}
a3=1/Sqrt[2]{{1+I,0},{0,1-I}}
a4=1/Sqrt[2]{{1,1-I},{1,1+I}}

to declare in an array so that I can compute the following.

To use nested For loop to compute the tensor product.

I want the equivalent of:

   For[i=1,i<5,i++,
       For[j=1,j<5,j++,
           For[k=1,k<5,k++, 
                           Print[Outer[Times,a[i],a[j],a[k]]]]]]

Thanks for your sincere help,
Sima.

___________________________________
IIT Kharagpur, http://www.iitkgp.ac.in







  • Prev by Date: RE: how to pass a document to word
  • Next by Date: Re: Is this a problem in mathematica?
  • Previous by thread: Re: Closing All Input Cells at Once
  • Next by thread: Re: 2X2 arrays