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

Home » Public Forums » archive » number problem
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: number problem [message #61262 is a reply to message #61198] Thu, 10 July 2008 07:18 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
d.poreh@gmail.com wrote:
>
> i don't know still not work this is my idl to read some data:
> function read_DE,file
>
>
> file=dialog_pickfile(filter='*.txt')
> openr,lun,file,/get_lun
> header=strarr(5)
> readf,lun,header
> utx=(dblarr(10000))
> uty=(dblarr(10000))
> elv=(dblarr(10000))
> col=(dblarr(10000))
> row=(dblarr(10000))
> dist=(dblarr(10000))

Think about what this line is doing:
> a=0&b=0&c=0&d=0&e=0&f=0

...and how you subsequently use the variables.

> count=0
> while (NOT EOF(lun)) DO BEGIN
> readf,lun,a,b,c,d,e,f
> utx(count)=a
> uty(count)=b
> elv(count)=c
> col(count)=d
> row(count)=e
> dist(count)=f
> count=count+1
> endwhile
> utx=utx(0:count-1)
> uty=uty(0:count-1)
> elv=elv(0:count-1)
> col=col(0:count-1)
> row=row(0:count-1)
> dist=dist(0:count-1)
> data=fltarr(4,count)
> data[0,*]=utx
> data[1,*]=uty
> data[2,*]=elv
> data[3,*]=dist
>
>
> free_lun, lun
> return,data
> end
> and this is a few lines of import data:
>
>
> RiverTools Channel Profile
>
> Number of profile points: 1472
>
> UTM-x UTM-y Elev Col
> Row Distance
>
> 521228.87049479 3394754.96918202 2221.55273438 1078
> 592 0.00000000
> 521208.87243379 3394754.96918202 2218.10253906 1077
> 592 0.01999806
> 521188.87437279 3394754.96918202 2215.02856445 1076
> 592 0.03999612
> 521168.87631179 3394754.96918202 2212.82934570 1075
> 592 0.05999418
> 521148.87825079 3394754.96918202 2210.48925781 1074
> 592 0.07999224
> 521128.88018979 3394754.96918202 2207.43017578 1073
> 592 0.09999030
> 521108.88212879 3394754.96918202 2204.14746094 1072
> 592 0.11998836
> 521088.88406779 3394754.96918202 2201.20776367 1071
> 592 0.13998643
> 521068.88600679 3394754.96918202 2198.28808594 1070
> 592 0.15998448
> 521048.88794579 3394754.96918202 2195.11572266 1069
> 592 0.17998254
> 521028.88988479 3394754.96918202 2192.23193359 1068
> 592 0.19998060
> 521008.89182379 3394754.96918202 2190.31323242 1067
> 592 0.21997866
> 520988.89376279 3394774.96745102 2187.50000000 1066
> 591 0.24826033
> 520968.89570179 3394774.96745102 2185.21508789 1065
> 591 0.26825839
> 520948.89764079 3394774.96745102 2183.00000000 1064
> 591 0.28825647
> 520928.89957979 3394794.96572002 2181.38085938 1063
> 590 0.31653816
> 520908.90151879 3394794.96572002 2180.30151367 1062
> 590 0.33653623
> 520888.90345779 3394794.96572002 2177.80688477 1061
> 590 0.35653430
> 520868.90539679 3394794.96572002 2174.75122070 1060
> 590 0.37653238
>
>
> but still i can't get proper answer, this is lat-lon data and i need
> exact data.
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: x*x versus x^2
Next Topic: Re: Compare two variables

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

Current Time: Wed Oct 08 17:55:09 PDT 2025

Total time taken to generate the page: 0.00456 seconds