Re: help with simple data transform
- To: mathgroup at smc.vnet.net
- Subject: [mg37747] Re: help with simple data transform
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Mon, 11 Nov 2002 05:10:05 -0500 (EST)
- References: <aqld8o$bie$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Terrell, dat={{n,n,n,n},{n,n,n,n,n,n},{n,n,n,n,n},{n,n}}; {First[#],Rest[#]}&/@dat {{n,{n,n,n}},{n,{n,n,n,n,n}},{n,{n,n,n,n}},{n,{n}}} -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 "Terrell Mitchell" <usenet at twocedars.mailshell.com> wrote in message news:aqld8o$bie$1 at smc.vnet.net... > > I am trying to help a friend at a University create some plots of his > data. I have a trial version of Mathematica and it looks like it will > do the job, but I need help with a simple problem. > > I have written some code to massage the data and put it in forms for > reading into Mathematica. > > I will be doing a surface plot and want to provide can provide my own > triangulation data. > > I will have data of the form > n n n n > n n n n n n > n n n n n > n n > I can read this into lists and end up with > {n,n,n,n},{n,n,n,n,n,n},{n,n,n,n,n},{n,n} > I need to turn this into > {n,{n,n,n}},{n,{n,n,n,n,n}},{n,{n,n,n,n}},{n,{n}} > to use as the triangulation data. > > Can some kind soul provide me with some Mathematica code to transfrom my > data into the proper format. There are so many features, there must be > some simple transformation code. > > Thank you in advance. > > > -- > > Terrell Mitchell > E-mail: usenet at privatetwocedars.mailshell.com > remove "private" for sending email >