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

Home » Public Forums » archive » Re: Writing a lot of data to ASCII file without a loop?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Writing a lot of data to ASCII file without a loop? [message #76864 is a reply to message #76863] Tue, 12 July 2011 03:45 Go to previous messageGo to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
On 12/07/11 12:11, Rob wrote:
> I need to write a large array of values to an ASCII file in two long
> columns and wondered if there was a quick way of doing it.

Write them as a single array:

IDL> s1 = [1,2,3,4]
IDL> s2 = [5,6,4,1]
IDL> writeit = TRANSPOSE([[s1],[s2]])
IDL> print, writeit, format = '(G15.9)'
1.00000000 5.00000000
2.00000000 6.00000000
3.00000000 4.00000000
4.00000000 1.00000000

That gets rid of the loop, but still does a lot of binary-to-ascii
conversions, so do not expect miracles.


chl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Writing a lot of data to ASCII file without a loop?
Next Topic: Re: Ready to quit after 25 years...

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

Current Time: Sat Oct 11 13:09:55 PDT 2025

Total time taken to generate the page: 0.71849 seconds