Re: About Table
- To: mathgroup at smc.vnet.net
- Subject: [mg74980] Re: [mg74954] About Table
- From: János <janos.lobb at yale.edu>
- Date: Fri, 13 Apr 2007 02:07:00 -0400 (EDT)
- References: <200704120856.EAA25776@smc.vnet.net>
On Apr 12, 2007, at 4:56 AM, Evanescence wrote: > Hello dear all: > My questions are as follows: > First I have a list is{3,6,9,4.4,6.7,5,3,6.2,3.7,5.2,6.3,9,10,12,13.2} > Then I want to have tableform is as follows: > > 0 0 3 > 0 0.5 6 > 0 1 9 > 0 1.5 4.4 > 0 2 6.7 > 0.5 0 5 > 0.5 0.5 3 > 0.5 1 6.2 > 0.5 1.5 3.7 > 0.5 2 5.2 > 1 0 6.3 > 1 0.5 9 > 1 1 10 > 1 1.5 12 > 1 2 13.2 > > Please tell me how can I do it. > Thank you very much > Evanescence 2007 04 11 > Here is a newbie approach: In[7]:= lst = {3, 6, 9, 4.4, 6.7, 5, 3, 6.2, 3.7, 5.2, 6.3, 9, 10, 12, 13.2} In[36]:= TableForm[Table[ {N[Ceiling[ 3*(i/Length[lst]) - 1]/ 2], N[Mod[i - 1, 5]/2], lst[[i]]}, {i, 1, Length[lst]}]] Out[36]//TableForm= TableForm[{{0., 0., 3}, {0., 0.5, 6}, {0., 1., 9}, {0., 1.5, 4.4}, {0., 2., 6.7}, {0.5, 0., 5}, {0.5, 0.5, 3}, {0.5, 1., 6.2}, {0.5, 1.5, 3.7}, {0.5, 2., 5.2}, {1., 0., 6.3}, {1., 0.5, 9}, {1., 1., 10}, {1., 1.5, 12}, {1., 2., 13.2}}] J=E1nos ---------------------------------------------- Trying to argue with a politician is like lifting up the head of a corpse. (S. Lem: His Master Voice)
- References:
- About Table
- From: "Evanescence" <origine26@yahoo.com.tw>
- About Table