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

Home » Public Forums » archive » ARRAYS
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: Arrays [message #39968 is a reply to message #2860] Tue, 29 June 2004 17:26 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rafael Loos writes:

> Hi, I am new with IDL and I am having some problems with arrays.
> I have a file with 4 column and 5,607,515 rows.
>
> Example of one line: 3 492515.080 5506165.090 98.320
>
> I am separating all the columns in different arrays (1, 5607515)
>
> The problem is when I try to visualize the SECOND column (492515.080)
> ... what I see is just the numbers before de "point" and the point (eg
> 492515.) all the numbers after I can not see ...
> With the other columns that is not a problem ... just with the second
> ... What am I doing wrong ?

Well, I don't know why your problems are confined to just
the second column, but I agree with Craig that you need
to make these values double precision. Note this experiment:

IDL> d='3 492515.080 5506165.090 98.320'
IDL> a=fltarr(4)
IDL> print, a[1]
492515.

And, then:

IDL> a=dblarr(4)
IDL> reads, d, a
IDL> print, a[1]
492515.08

And, especially,

IDL> print, a[1], format='(F20.4)'
492515.0800

You might find this article useful:

http://www.dfanning.com/tips/double.html

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
Read Message
Read Message
Read Message
Previous Topic: 3D overplotting??
Next Topic: Re: 3D overplotting??

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

Current Time: Sun Nov 30 05:25:31 PST 2025

Total time taken to generate the page: 0.48324 seconds