2
$\begingroup$

I have a list with values at some points:

 list1 = {{0.0, 0.001119484321}, {0.80, 0.001128926919}, {1.6, 
0.001120999228}, {2.4, 0.001086309651}, {3.2, 
0.001114222604}, {4.0, 0.001059617102}, {4.8, 
0.000840821088}, {5.4, 0.000513081122}};

Now I want to generate value at following points by interpolating the above data (interpolation order 3):

points = Table[i, {i, 0, 5, 0.25}];

Any help would be appreciated.

$\endgroup$
3
$\begingroup$

Slightly different approach:

int = Interpolation[list1, InterpolationOrder -> 3]

Using this to compute values for new points:

int[Range[0, 5, 0.25]]

{0.00111948, 0.00112373, 0.00112692, 0.00112875, 0.00112894, \ 0.00112721, 0.00112326, 0.00111384, 0.00110141, 0.00109074, \ 0.00108935, 0.00109937, 0.00110931, 0.00111407, 0.0011078, \ 0.00109048, 0.00105962, 0.00101325, 0.000948008, 0.000861064, \ 0.000749579}

And this is visual comparison (new points are in red):

 Show[Plot[int[x], {x, 0, 5.4}], 
 ListPlot[list1, PlotStyle -> Directive[Blue, PointSize[Medium]]], 
 ListPlot[Transpose[{Range[0, 5, 0.25], int[Range[0, 5, 0.25]]}], 
  PlotStyle -> Directive[Red, PointSize[Medium]]]]

enter image description here

| improve this answer | |
$\endgroup$
2
$\begingroup$
y = Fit[list1, {1, x, x^2, x^3}, x];

y /. x -> Range[0, 5, .25]

{ 0.00113979, 0.00111488, 0.00109939, 0.00109181, 0.00109067, 0.00109447, 0.00110173, 0.00111096, 0.00112068, 0.0011294, 0.00113563, 0.00113788, 0.00113467, 0.00112451, 0.00110591, 0.0010774, 0.00103747, 0.000984644, 0.000917436, 0.000834359, 0.000733924}

Your original points in red, the interpolated points in green:

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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