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

Home » Public Forums » archive » Re: write to *.txt files
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
Re: write to *.txt files [message #82117] Tue, 20 November 2012 04:02
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Tuesday, November 20, 2012 3:57:24 AM UTC-8, alx wrote:
> On Tuesday, November 20, 2012 11:33:14 AM UTC+1, dave poreh wrote:
>
>> Folks,
>
>>
>
>> hi,
>
>>
>
>> I have an array y in IDL:
>
>>
>
>> 44.5829 11.6211 -15.7803 0.681355
>
>>
>
>> 44.5831 11.6207 -6.00803 0.504367
>
>>
>
>> 44.5829 11.6225 -0.108904 0.443944
>
>>
>
>> 44.5834 11.6247 -9.40710 0.619288
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> and i want to write it to a text filt like this:
>
>>
>
>>
>
>>
>
>> openw,1,'LOG_and_Lagrangian.txt'
>
>>
>
>> z=transpose(reform([y(1,*),y(0,*), y(3,*)], n_elements(y(0,*)),3))
>
>>
>
>> printf,1,z
>
>>
>
>> close,1
>
>>
>
>>
>
>>
>
>> but i get wrong result,
>
>>
>
>> 11.6077 0.683156 44.5241
>
>>
>
>> 44.4470 11.6047 0.512318
>
>>
>
>> 0.550291 44.4740 11.6346
>
>>
>
>> 11.6096 0.471280 44.5244
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> Can someone please help me?
>
>>
>
>> Best,
>
>>
>
>> Dave
>
>
>
> openw,1,'LOG_and_Lagrangian.txt'
>
> printf,1,y[[1,0,3],*]
>
> close,1
>
>
>
> alx.

Thanks Alx, working fine :,
Best,
Dave
Re: write to *.txt files [message #82118 is a reply to message #82117] Tue, 20 November 2012 03:57 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On Tuesday, November 20, 2012 11:33:14 AM UTC+1, dave poreh wrote:
> Folks,
>
> hi,
>
> I have an array y in IDL:
>
> 44.5829 11.6211 -15.7803 0.681355
>
> 44.5831 11.6207 -6.00803 0.504367
>
> 44.5829 11.6225 -0.108904 0.443944
>
> 44.5834 11.6247 -9.40710 0.619288
>
>
>
>
>
>
>
> and i want to write it to a text filt like this:
>
>
>
> openw,1,'LOG_and_Lagrangian.txt'
>
> z=transpose(reform([y(1,*),y(0,*), y(3,*)], n_elements(y(0,*)),3))
>
> printf,1,z
>
> close,1
>
>
>
> but i get wrong result,
>
> 11.6077 0.683156 44.5241
>
> 44.4470 11.6047 0.512318
>
> 0.550291 44.4740 11.6346
>
> 11.6096 0.471280 44.5244
>
>
>
>
>
> Can someone please help me?
>
> Best,
>
> Dave

openw,1,'LOG_and_Lagrangian.txt'
printf,1,y[[1,0,3],*]
close,1

alx.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: write to *.txt files
Next Topic: Dimensional confusion

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

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

Total time taken to generate the page: 0.00449 seconds