MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: 2D array to tab delimited file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25318] Re: [mg24695] 2D array to tab delimited file
  • From: Christopher Lee French <clfrench at bellatlantic.net>
  • Date: Tue, 19 Sep 2000 03:45:49 -0400 (EDT)
  • References: <200008040519.BAA05094@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Leon,

Array[Plus, {10, 10}]
// ToString
// StringReplace[#, {", " -> "\t", "}, " -> "\n", "{" -> "", "}" -> ""}] &
// WriteString[OpenWrite["filename.tab"], #] &;

Streams[]
// Drop[#, 2] &
// Close /@ # &;

ReadList["filename.tab", Word, RecordLists -> True, WordSeparators -> {"\t"}]
// ToExpression
// MatrixForm

allot can be done with direct string manipulation

CLFrench


L Lobo wrote:

> I am creating a large 2D array and need to save it to file (tab delimited)
> which is then read by LabVIEW. I have tried using Export but the spaces
> created between columns varies. I have looked up old postings on this
> newsgroup but the solutions I've seen seem to be a bit longwinded. I have
> version 4. Any ideas?
>
> --
> Leon Lobo
> Optical Engineering Group
> Department of Mechanical Engineering
> Loughborough
> Leics.
> LE11 3TU



  • Prev by Date: Re: Newbie question
  • Next by Date: Re: Animate multiple listplots
  • Previous by thread: RE: matrix indices
  • Next by thread: Re: 2D array to tab delimited file