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

Home » Public Forums » archive » Re: Output_To_Ascii
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: Output_To_Ascii [message #69800 is a reply to message #69799] Thu, 11 February 2010 17:42 Go to previous messageGo to previous message
Hassan is currently offline  Hassan
Messages: 48
Registered: October 2009
Member
On Feb 11, 7:47 pm, pp <pp.pente...@gmail.com> wrote:
> On Feb 11, 9:46 pm, Hassan <hkhav...@gmail.com> wrote:
>
>
>
>
>
>> 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
>
> It seems that you want something like:
>
> openw,unit,'output.dat',/get_lun
> for i=0,999 do begin
>   printf,unit,[5,62],in[*,*,i],format='(I0,1X,I0,/,65(F-6.2))'
>   printf,unit,'END'
> endfor
> fre_lun,unit- Hide quoted text -
>
> - Show quoted text

Thaks. yes, that's the thing I need but i need to change it a bit. any
explanation about Format? any link?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Output_To_Ascii
Next Topic: 2 plotting questions

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

Current Time: Wed Oct 08 18:26:24 PDT 2025

Total time taken to generate the page: 0.00188 seconds