Re: 3D graphing from text file?
- To: mathgroup at smc.vnet.net
- Subject: [mg108229] Re: 3D graphing from text file?
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Thu, 11 Mar 2010 06:35:53 -0500 (EST)
On 3/10/10 at 1:46 AM, cubsfan334 at gmail.com (cubsfan334) wrote: >I have a text file with the coordinates of a number of different >points, and I would like to plot them using the ListPointPlot3D >command. My text file is arranged like this: >x1 *tab* y1 *tab* z1 *tab* x2 *tab* y2 *tab* z2 *tab* x3 etc, with >nothing but tabs in between. Is it possible to have mathematica >automatically parse this file and insert brackets and commas in the >proper place, so the result would look like this: >{{x1, y1, z1}, {x2, y2, z2}, {x3, y3, z3}} etc? Assuming each item between tabs is a numeric item, then Partition[ReadList[filename, Number],3] will do what you want.