Output_To_Ascii [message #69802] |
Thu, 11 February 2010 15:46 |
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
|
|
|