Interpolation and InterpolationOrder

Posted 10 years ago
2661 Views
|
4 Replies
|
0 Total Likes
|
 Dear friends:Please,Could you show me what is  the difference between the two solutions below? What is the best? What is using Spline or Hermite?data = Table[{i, RandomReal[i]}, {i, 1, 10}]f = Interpolation[data];Plot[f[x], {x, 1, 10}, Epilog -> {PointSize[Medium], Point[data]}]and data = Table[{i, RandomReal[i]}, {i, 1, 10}]ListLinePlot[data, Epilog -> {PointSize[Medium], Point[data]}, InterpolationOrder -> 2]Thank youAna
4 Replies
Sort By:
Posted 10 years ago
 Thank you
Posted 10 years ago
Posted 10 years ago
 RandomReal[{0, 1}, 10] No, I am sorry. Your command  give you 10 numbers between 0 and 1 . My solutions have 10 numbers growing to the maximum 10. Do you agree? {{1, 0.102764}, {2, 1.03161}, {3, 0.438019}, {4, 2.5208}, {5,   2.59028}, {6, 1.72661}, {7, 1.63866}, {8, 6.86}, {9, 1.50267}, {10,   6.5436}}Thank you,Ana
Posted 10 years ago
 SeedRandom[0]; data = RandomReal[{0, 1}, 10];f = Interpolation[data]; f1 = Interpolation[data, InterpolationOrder -> 2];Plot[{f[x], f1[x]}, {x, 1, 10}]