Re: expression formatting inside tables
- To: mathgroup at smc.vnet.net
- Subject: [mg54727] Re: expression formatting inside tables
- From: "wouter meeussen" <wouter.meeussen at pandora.be>
- Date: Mon, 28 Feb 2005 03:27:17 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
hold your foo : foo[x_] := x^2 Table[{HoldForm[foo][i], foo[i]}, {i, 5}] {{foo[1], 1}, {foo[2], 4}, {foo[3], 9}, {foo[4], 16}, {foo[5], 25}} W. "Trevor Baca" <trevorbaca at gmail.com> wrote in message news:cvhj24$s7q$1 at smc.vnet.net... > hi mathgroup folks, > > let > > foo[x_] := x^2 > > then how to easily tableize the following? > > foo[1] 1 > foo[2] 4 > foo[3] 9 > foo[4] 16 > foo[5] 25 > > because neither > > Table[{HoldForm[foo[i]], foo[i]}, {i, 5}] // TableForm > > nor > > Table[{foo[HoldForm[i]], foo[i]}, {i, 5}] // TableForm > > did what i was expecting. > > trevor >