Re: TableHeadings

*To*: mathgroup at smc.vnet.net*Subject*: [mg15072] Re: [mg15046] TableHeadings*From*: Robert Pratt <rpratt at math.unc.edu>*Date*: Thu, 10 Dec 1998 03:13:04 -0500*Sender*: owner-wri-mathgroup at wolfram.com

> 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/