3
$\begingroup$

I have the following data:

top = 
  {{0., 59.5}, {0.1, 30.7}, {0.2, 21.1}, {0.3, -7.73}, {0.4, -17.3}, {1., -36.6}, 
   {5., -75.}, {8., -104.}, {10., -123.}, {15., -94.2}, {20., -65.4}, {35., -36.6}, 
   {65., -7.73}, {100., 1.87}}

Using ListPlot I see that there is some order in the data. I get a feeling that some kind of smooth function could be fitted to it. But I have huge problems when I am trying to do that.

I tried to use Interpolation[top] but I wasn't really satisfied. Then I tried InterpolatingPolynomial[top, x] which turned out to be even worse. Then I tried to use Fit for different polynomial orders but again nothing seemed useful.

And I am sure I am not the first one with this problem, so my question is: what can one do in that case?

I was thinking also thinking about making a linear interpolation between points, but I have to admit that I would rather see something smoother. So is there a way I can make things smoother? :/

Maybe I should consider three or more parts and than combine them together?

Please note that the data I provided is almost random. Almost means that the next file I will import may not have an extreme value at (10.0, -132.0) but maybe at (9.0, -125.0). But the shape shall be more or less the same. Just saying this in the case it might change anything.

$\endgroup$

closed as off-topic by m_goldberg, chuy, MarcoB, dr.blochwave, Sjoerd C. de Vries Jul 15 '15 at 16:50

  • The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Is this good enough? f = Interpolation[top, InterpolationOrder -> 2, Method -> "Spline"] and Plot[f[t], {t, 0, 100}] $\endgroup$ – Coolwater Jul 15 '15 at 11:25
  • 1
    $\begingroup$ One thing you could try is filtering your data and try a fit or an interpolation on the filtered result. Another approach would be to come up with some kind of more complex model and try to fit that with NonLinearModelFit $\endgroup$ – Sjoerd C. de Vries Jul 15 '15 at 11:25
  • 2
    $\begingroup$ Quite likely, the theory behind where your data came from might provide a model you can use. $\endgroup$ – J. M. is away Jul 15 '15 at 12:01
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because the issue it raises is not a Mathematica issue but a mathematical one. That it is formulated in terms of Mathematica is not sufficient to make it an appropriate question for Mathematica.SE. $\endgroup$ – m_goldberg Jul 15 '15 at 13:47
  • 2
    $\begingroup$ With only 14 data points and no repeats for any predictor value you're never going to be totally confident about a fit (especially if there is much of any departure from a straight line). Knowing how the data is generated and if there might be some expected form for the response (both in mean and variance about the mean value) would certainly greatly supplement the data. This topic would probably be best addressed at Cross Validated (stats.stackexchange.com). $\endgroup$ – JimB Jul 15 '15 at 15:51