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

Home » Public Forums » archive » READ_ASCII - accessing data from structures
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: read_ascii [message #41755 is a reply to message #39371] Wed, 08 December 2004 12:54 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Francois writes:

> I use the following code to read an ascii file:
>> filename = dialog_pickfile(path='c:\')
>> data = READ_ASCII(filename, DATA_START=1, DELIMITER= ',')
>> data = data.field1
>
> I want data to become an array instead of a structure.
>
> The problem is that sometimes the array is contained in field01,
> sometimes in field01.
> How come it varies ?

I'm not sure I see the variation in the question,
but in any case I don't know why it varies. If it
*is* varying, why not try this:

data = READ_ASCII(filename, DATA_START=1, DELIMITER= ',')
data = data.(0)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Flip Matrix
Next Topic: number of decimals?

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

Current Time: Sun Oct 12 02:38:07 PDT 2025

Total time taken to generate the page: 0.31974 seconds