I have a set of data which looks like:

Time(s)     Data(arb.)  
0.000000000 937.800000
5.022000313 937.800000
10.04400015 937.800000
15.06500006 937.800000
20.08700037 937.800000
25.10900021 937.800000
...         ...

As you can see, data is recorded approximately every 5 seconds. I was wondering if there is a function with in Mathematica which will allow me to interpolate the whole data set and produce and interpolated data set at say every 1 second.

I have been experimenting with the ListInterpolation function but I am unsure on how to extend the examples given in the Documentation Centre to two column data and defining the time-step to something other than half way between two points.

Any help or push in the right direction would be appreciated!

  • $\begingroup$ Look at Interpolation. Look at the first example under "Scope". $\endgroup$
    – bill s
    Commented Apr 9, 2016 at 14:04
  • $\begingroup$ @bill s I tried the following: Do[Print[Interpolation[Baratron20160404NightReducedData, i]], {i, 63395}] but I'm unsure weather i is for the "time column" or the data column. $\endgroup$
    – user27119
    Commented Apr 9, 2016 at 14:04

1 Answer 1


Here is some data in an array, then interpolated at a finer grid specified by desiredPoints.

data = Thread[{Range[10], RandomInteger[{0, 5}, 10]}];
f = Interpolation[data];
desiredPoints = Range[2, 5, 0.1];
  • $\begingroup$ Thanks for the suggestion! So what is the "resolution" of this interpolation? Could you explain your solution a little further? Thanks! $\endgroup$
    – user27119
    Commented Apr 9, 2016 at 14:13
  • $\begingroup$ Look at the variable desiredPoints. This specifies the values at which you want to see the function, so it's in increments of 0.1 (as specified in the Range command). But you can figure these things out yourself. Look up the help file for Interpolation and Range. $\endgroup$
    – bill s
    Commented Apr 9, 2016 at 14:26
  • $\begingroup$ Okay so I think I understand your example. However when I load my data set into the interpolation function and set the range to Range[0,63395,1] and it errors! $\endgroup$
    – user27119
    Commented Apr 9, 2016 at 14:30
  • $\begingroup$ Sorry I am a moron, I loaded a plot into the function not the data set. Apologies. $\endgroup$
    – user27119
    Commented Apr 9, 2016 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.