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

Re: 2X2 arrays

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74659] Re: [mg74630] 2X2 arrays
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Fri, 30 Mar 2007 02:56:55 -0500 (EST)
  • References: <200703290728.CAA07540@smc.vnet.net>

On Mar 29, 2007, at 3:28 AM, simad at cse.iitkgp.ernet.in wrote:

> 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]]]]]]

a[1]=a1;
a[2]=a2;
a[3]=a3;
a[4]=a4;

Regards,

Ssezi




  • References:
  • Prev by Date: ReadList
  • Next by Date: New to mathematica: Question about solving differential eqs
  • Previous by thread: 2X2 arrays
  • Next by thread: Re: 2X2 arrays