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

Home » Public Forums » archive » Re: formatting array output?
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: formatting array output? [message #33865 is a reply to message #33862] Thu, 30 January 2003 06:25 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <3E394CDD.8F9B0C65@mail.utexas.edu>,
Murat Maga <maga@mail.utexas.edu> wrote:

> Hi All,
> I have an integer array (2000x1000) which I would like to write in file
> in the typical matrix convention. I think IDL breaks the line at 80th
> column and everything starts to look quite messy.
> To format an array output, do I use the print/printf, or are there any
> other tricks good to know?
> Best,
> Murat

Use a portable binary format like netcdf or hdf. You aren't really
planning to read the file, are you?

id = NCDF_OPEN('newfile')
d1 = NCDF_DIMDEF(id, 'dim1', 2000)
d2 = NCDF_DIMDEF(id, 'dim2', 1000)
vid = NCDF_VARDEF(id, 'matrix', [d1, d2], /LONG)
NCDF_CONTROL, id, /ENDEF
NCDF_VARPUT, id, 'matrix', matrix
NCDF_CLOSE, id

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: last array index subscript
Next Topic: Re: Alpha Blending inside of Widgets / Graphic Objects in Widgets

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

Current Time: Fri Oct 10 04:46:32 PDT 2025

Total time taken to generate the page: 0.56185 seconds