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

Home » Public Forums » archive » IDL QUESTIONS (INTERPOLATION)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL QUESTIONS (INTERPOLATION) [message #78366] Mon, 21 November 2011 05:59 Go to previous message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
Hi all,
I have interpolated some data, which I think I did well, the data
looks like this
time (s) velocity
24785555 -8.90000
24785675 -6.90000
24785795 -5.00000
24785915 -15.4000
24786035 -1.80000
24786155 21.5000
24786275 -2.70000
24786395 1326.90
24786515 0.100000
24786635 69.6000
24786755 -624.900
24786875 263.700
24786995 30.3000
24787115 157.000
24787235 488.300
24787355 25.6000
24787475 40.6000
24787595 32.5000
24787715 21.2000
24787835 13.6000
24787955 92.4000
24788075 37.0000
24788195 7.50000
24788315 4.80000
24788435 8.30000
24788555 43.4000
24788675 26.2000
24788795 36.7000
24788915 17.6000
24789035 -39.2000
24789155 -76.5000
24789275 -31.7000
24789395 -31.3000
24789515 -20.0000
24789635 1.10000
I want to create time axis in hours, I need help on time convetion, I
wrote a program like this
File = Dialog_pickfile(Filter = '*.txt')

;read the data
rows = File_lines(file)
data = Fltarr(2,rows)
openr,Lun,file,/Get_lun
ReadF,lun, data
b =floor(min(data[0,*])); start time
e = ceil(max(data[0,*])); end time
x = Scale_vector(Findgen(e-b+1),b,e)
y = interpol(data[1,*], data[0,*],x); interpolating data
;draw the plots
plot,data[0,*],data[1,*],linestyle=2 ; for original data
oplot,x,y,color=120 ; newly interpolated velocity data

end
I want to covert that time in two hour in the plot.

Thank you in advance for ur time
Zolile
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Plotting one ps file with different plots in separate pages
Next Topic: Faster way to search/split a string?

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

Current Time: Wed Oct 08 20:10:54 PDT 2025

Total time taken to generate the page: 0.00470 seconds