MathGroup Archive 2005

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

Search the Archive

Re: expression formatting inside tables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54606] Re: [mg54591] expression formatting inside tables
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 24 Feb 2005 03:21:10 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

foo[x_] :=x^2;

Table[
    {"foo["<>ToString[n]<>"]",foo[n]},
    {n,5}]//TableForm


Bob Hanlon

> 
> From: "Trevor Baca" <trevorbaca at gmail.com>
To: mathgroup at smc.vnet.net
> Date: 2005/02/23 Wed AM 03:12:53 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg54606] [mg54591] expression formatting inside tables
> 
> 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
> 
> 


  • Prev by Date: Re: Labels on graphs
  • Next by Date: Re: expression formatting inside tables
  • Previous by thread: Re: expression formatting inside tables
  • Next by thread: Re: expression formatting inside tables