MathGroup Archive 2004

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

Search the Archive

Re: How to construct a matrix like this ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50899] Re: How to construct a matrix like this ?
  • From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
  • Date: Mon, 27 Sep 2004 00:42:05 -0400 (EDT)
  • References: <cj63a6$qpr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

This does what you want:

Array[a, {2, 2}] /. a[i_, j_] :> Symbol[StringJoin["a", ToString[i], 
ToString[j]]]

Alternatively you could miss out the Array[a, {2, 2}] step:

Table[Symbol[StringJoin["a", ToString[i], ToString[j]]], {i, 2}, {j, 2}]

Steve Luttrell

<zhoukm at hotmail.com> wrote in message news:cj63a6$qpr$1 at smc.vnet.net...
> 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
> 



  • Prev by Date: Re: Publicon: removing line from table
  • Next by Date: Re: How to construct a matrix like this ?
  • Previous by thread: Re: How to construct a matrix like this ?
  • Next by thread: Re: How to construct a matrix like this ?