Re: expression formatting inside tables
- To: mathgroup at smc.vnet.net
- Subject: [mg54622] Re: [mg54591] expression formatting inside tables
- From: János <janos.lobb at yale.edu>
- Date: Thu, 24 Feb 2005 03:21:25 -0500 (EST)
- References: <200502230812.DAA26710@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Here is my newbie approach:
In[35]:=
nn = Table[{StringJoin[
"foo[", ToString[i],
"]"], foo[i]}, {i, 1, 5}]
Out[35]=
{{"foo[1]", 1}, {"foo[2]",
4}, {"foo[3]", 9},
{"foo[4]", 16}, {"foo[5]",
25}}
János
On Feb 23, 2005, at 3:12 AM, Trevor Baca wrote:
> 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
----------------------------------------------
Trying to argue with a politician is like lifting up the head of a
corpse.
(S. Lem: His Master Voice)
- References:
- expression formatting inside tables
- From: "Trevor Baca" <trevorbaca@gmail.com>
- expression formatting inside tables