comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » printing comma delimeted file from vectors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
printing comma delimeted file from vectors [message #82903] Fri, 25 January 2013 13:25 Go to next message
justinclouds is currently offline  justinclouds
Messages: 25
Registered: December 2012
Junior Member
I have the following vectors (Date, time, rhie, cirrusp) each of the form FLOAT = Array[1, 16595]. The code below puts all the data in one single column (and no commas) instead of 4 comma delimited columns. In the past this has worked for me. Can somebody help with correcting the syntax to produce the 4 comma delimited columns.

openw, lun, opath+dir+'_kramer4.txt', /get_lun
printf, lun, 'Date, time, rhie, cirrusp'
printf, lun, date,',',time,',',rhie,',',cirrusp
free_lun, lun
Re: printing comma delimeted file from vectors [message #82975 is a reply to message #82903] Mon, 28 January 2013 08:17 Go to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On Friday, January 25, 2013 2:25:51 PM UTC-7, justinclouds wrote:
> Can somebody help with correcting the syntax to produce the 4 comma delimited columns.
>

Note there's also WRITE_CSV:

http://www.exelisvis.com/docs/WRITE_CSV.html

mp
Re: printing comma delimeted file from vectors [message #84714 is a reply to message #82903] Fri, 25 January 2013 14:36 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
>
> printf, lun, date,',',time,',',rhie,',',cirrusp


Take a peak at

http://www.idlcoyote.com/tips/csv_file.html

You'd have to make a 4xn array like so:

IDL> data = [date, time, rhie, cirrusp]

but then you should be directly apply the concepts from the link.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to put several figures in a postscript file?
Next Topic: Help with rgb_table in plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:33 PDT 2025

Total time taken to generate the page: 0.00495 seconds