Interpolation Method: Solving Missing Data

  • Context: Undergrad 
  • Thread starter Thread starter danutz
  • Start date Start date
  • Tags Tags
    Interpolation Method
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
danutz
Messages
2
Reaction score
0
hi i need some help with a problem I'm dealing with
i have a text file of this format
01 08 2002 12 45 26.7
01 08 2002 13 00 27.8
01 08 2002 13 15 27.0
01 08 2002 13 30 28.2
the last being the temperature and i need to interpolate some missing elements using not only the values before and after that elem but also the previous and next day temperatures (meaning if i wanted to interpolate the second row i would need to use the 1st the third and the values at 13:00 in the previous and next day for example) i would really appreciate if someone could tell me which method to use
ps:i used a polynomial interpolation so far
 
Physics news on Phys.org
Hi danutz! :smile:

Because the solution must be periodic, I guess that trigonometric interpolation could give you something good: http://en.wikipedia.org/wiki/Trigonometric_interpolation

But note, if you use the sine functions, then you will be periodic with period [itex]2\pi[/itex]. If you want to be periodic with period T (for example, 24h), then you will have to use

[tex]f(x)=\sin(\frac{2\pi}{T}x)[/tex]

instead of the sine.
 
thanks i looked through it but my function won't be a periodic function but one that has somehow random values so it cannot be defined like f(x)=...
i need a method that doesn't interpolate only by the interp polynomial but also by some other values(the temperatures in other days at the same hour) i think it's more like having more than one function and for interpolating f(x0) i need g(x0) and h(x0) and f(points i use to make the polynomial interpolation, x1 x2 ...)

or is it ok to make the polyn interpolation, obtain an f(x0) and just to make some calculus like 3/4f(x0)+ (h(x0)+g(x0))/2/4??
 
Last edited: