This is not a question about interpolation. Why not?
What is interpolation? It involves finding a curve that passes EXACTLY through the data points.
You clearly don't want to do that. But you are trying to use tools for interpolation, thus spline, interp1, etc.
You want to do smoothing and approximation. Since you have no model for this process, at best, you need to use a tool for spline smoothing of some sort. Polynomial curve fitting is a really BAD idea here, because you would need a really high order polynomial for the fit.
A good tool for this purpose would be my SLM Toolbox. There are many options. But given this very small set of rather noisy data, I tried this: spl = slmengine(x,y,'plot','on','reg','cross');
which seems to be as much as it is worth.
You can download it from the File Exchange.
Now that you have uploaded your data,
mdl = slmengine(x,y,'plot','on','knots',100,'maxvalue',1);
If I now look more carefully at just the first section that seems fairly linear, there are a couple of things I see.
First, the curve seems to have a periodic behavior, that the spline wanted to follow. You can either smooth that out, treating it as noise, or you can chase it as I allowed the spline to do here.
Next, I see that your data appears to be quantized. So rather than random noise, you have a process that takes on only discrete levels. I'm not sure this really matters too much in context though.
Best Answer