Re: How to construct a matrix like this ?

*To*: mathgroup at smc.vnet.net*Subject*: [mg50898] Re: [mg50895] How to construct a matrix like this ?*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Mon, 27 Sep 2004 00:42:04 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

On 26 Sep 2004, at 18:32, zhoukm at hotmail.com wrote: > With Array[a, {2,2}] I can get an array like: > | a[1,1] a[1,2] | > | a[2,1] a[2,2] |. > But occasionally I want matrix like: > | a11 a12 | > | a21 a22 | > I remember I once figured out a way to do it but now I forgot. Anyone > can give me a hand? > > Regards > f[i_, j_] := ToExpression[StringJoin["a", ToString[i], ToString[j]]] Array[f, {2, 2}] {{a11, a12}, {a21, a22}} Andrzej Kozlowski Chiba, Japan http://www.akikoz.net/~andrzej/ http://www.mimuw.edu.pl/~akoz/