Message Boards Message Boards

0
|
2888 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Interpolation and InterpolationOrder

Posted 11 years ago
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 you
Ana
POSTED BY: Ana Squadri
4 Replies
Posted 11 years ago
Thank you
POSTED BY: Ana Squadri
POSTED BY: Frank Kampas
Posted 11 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 BY: Ana Squadri
SeedRandom[0]; data = RandomReal[{0, 1}, 10];
f = Interpolation[data]; f1 =
Interpolation[data, InterpolationOrder -> 2];
Plot[{f[x], f1[x]}, {x, 1, 10}]
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract