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

Home » Public Forums » archive » Output_To_Ascii
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
Output_To_Ascii [message #69802] Thu, 11 February 2010 15:46
Hassan is currently offline  Hassan
Messages: 48
Registered: October 2009
Member
Hi all,

I have an array 'in' which its dimension is (66,5,1000) which need to
export it to an ascii file.
openw,1,'output.dat' >>open a new file to write the data to
string_vec=make_array(1,1000,value='END') >> I need to put 'end' word
at the end of each (66,5) array which will be 1000 in total
for i=0,1000 do printf,1,[5,62],in[*,*,i],string_vec[i]
close,1

I need the output file like this:
5 62
5.5 34 21.3 67.7 0.01 0.80 ... >> this should be 66
columns
4 6.7 34 45 0.03 0.02 ...
34.6 5 80 345 0.02 0.02 ...
43 45 56 56 0.05 0.08 ...
END

but the output is like this:
5 62 >>it doesnt start exactly from the begining of
the line
5.5 34 21.3
67.7 0.01 0.80 ... >> the 66 columns places in more than
one line
4 6.7 34
45 0.03 0.02 ...
34.6 5 80 345
0.02 0.02 ...
43 45 56
56 0.05 0.08 ....
END

I wonder how i can solve this problem as:
1. each line of the data start exactly from the beging of each line
2. all the data in the same line, would place in one line instead of
placing in several lines

Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: time cost for file reading increasing!!! same file!
Next Topic: Re: Output_To_Ascii

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

Current Time: Wed Oct 08 13:40:46 PDT 2025

Total time taken to generate the page: 0.00550 seconds