TableHeadings

*To*: mathgroup at smc.vnet.net*Subject*: [mg15046] TableHeadings*From*: Roger Mason <rmason at sparky2.esd.mun.ca>*Date*: Wed, 9 Dec 1998 04:12:29 -0500*Sender*: owner-wri-mathgroup at wolfram.com

Hi, 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? Thanks, Roger Mason