MathGroup Archive 1998

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

Search the Archive

Re: TableHeadings


> I wish to tabulate the values returned by a function of two variables,
> with the columns and rows labelled using the TableHeadings option to
> TableForm. The code I am using is given below.
> 
> s[n_,c_]:=If[n<c^2,"n < c^2",If[n>c, "n > c",(n-c^2)/(c-c^2)]] (*
> function definition *)
> 
> TableForm[Table[s[n,c], {c, 0.1, 1, 0.1}, {n, 0.1, 1, 0.1}],
> TableHeadings->{{c},{n}}]
> 
> This, of course just labels the first row and first column with c and n,
> respecitvely. What I want is to have the appropriate numerical values
> of c and n, as used in the function s[c_,n_], as labels. can it be done
> using TableHeadings? I not, what is the best way to accomplish what I
> want?

Roger,

You need to feed in the lists of labels.  Try

TableHeadings->{Range[0.1,1,0.1],Range[0.1,1,0.1]}

Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill CB# 3250, 331 Phillips
Hall
Chapel Hill, NC  27599-3250

rpratt at math.unc.edu

http://www.math.unc.edu/Grads/rpratt/




  • Prev by Date: Monte Carlo simulations on a Mac??
  • Next by Date: Re: Mathematica Ouput: subscripts and superscripts
  • Previous by thread: Re: TableHeadings
  • Next by thread: Re: TableHeadings