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

Home » Public Forums » archive » Re: Problem to read some data.
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: Problem to read some data. [message #68452 is a reply to message #68437] Fri, 23 October 2009 07:01 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 23, 7:42 am, Dav_Poreh <d.po...@gmail.com> wrote:
> On 23 Okt., 02:26, pfp <pfpente...@gmail.com> wrote:
>
>
>
>> On Oct 23, 4:59 am, Dav_Poreh <d.po...@gmail.com> wrote:
>
>>> Folks
>>> I want to read some data with *.dat format with unknown number of
>>> columns and rows. I tried to read with*DDREAD.pro* but it does not
>>> work. Data for each file is like this:
>
>>> 260.559844971  4.000000000  0.390625000   0.460937500 ……..
>>> 260.559844971  4.000000000  0.382812500 0.318359375……..
>>> 260.559844971  4.000000000  0.414062500 0.439453125 ……..
>>> ……
>>> …..
>>> .….
>>> Actually I don’t know the number of rows and columns (but definitely
>>> number of rows is less than columns). Does anyone have experience to
>>> how read this kind of files?
>>> Any help highly will be appreciated.
>>> Cheers
>
>> Try something like
>
>> a=read_ascii('file.dat')
>> sz=size(a.(0),/dim)
>> ncols=sz[0]
>> nrows=sz[1]
>
>> ddread is not a built-in routine, so when you mention it you should
>> say where it is from. Also, "*.dat format" means nothing.
>
> Thank you
> that's okay. but is there any way to avoid from loop?

What loop? I do not see any loops.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What is the problem ?
Next Topic: plot some data with a legend

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

Current Time: Fri Oct 10 04:49:02 PDT 2025

Total time taken to generate the page: 1.67938 seconds