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

Home » Public Forums » archive » Re: Printing multiple columns in IDL
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: Printing multiple columns in IDL [message #61771] Fri, 01 August 2008 06:01 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Joost Aan de Brugh writes:

> Now I read this thread I was wondering how I could solve my printf-
> problem. I have a procedure that prints out data in a huge 2D array. I
> cannot know beforehand how much data has to be put into the file (That
> depends on how my research is going on and if I knew that beforehand,
> it wouldn't be research). I used:
>
> dataline =3D strjoin(string(data[*,0])) ; All rows should have equal
> length
> width =3D strlen(dataline) > max(strlen(headerlines))
> openw,lun,'filename.dat',/Get_Lun,Width=3Dwidth
>
> And because my data consists of doubles and I use default format
> everywhere, I see that my width is 16 times the number of data
> columns. My width was 160. Now I wrote such a file and I see that all
> my data rows are cut at 9 values. The line is 144 long and the next
> line (containing the tenth column) is 16 long. This also happens for
> other number of columns. I tried to add one to the width for safety,
> but that does not work.
>
> Why does this not work and can anyone help me?

Weird. Have you tried using a format statement?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Edge detection and convert edges into polygons
Next Topic: Piecewise curve fitting in idl

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

Current Time: Fri Oct 10 12:55:25 PDT 2025

Total time taken to generate the page: 0.32655 seconds