-1
$\begingroup$

Can anyone help me to interpolate this list of data?

I try to use Interpolation function but think the number of points it's not enough.

Here I show the result using ListPlot:

enter image description here

I want to interpolate beacuse I want the "y" for a specific value of "x".

List of data

$\endgroup$
  • 3
    $\begingroup$ Which y do you want for x==.04? $\endgroup$ – Carl Woll Sep 19 '17 at 17:34
  • $\begingroup$ Do you want a parametric interpolation (of the form $(x(s),y(s)$)? $\endgroup$ – anderstood Sep 19 '17 at 17:40
  • $\begingroup$ Let supose the horizontal axes is "x" and the vertical is "y". I want a interpolation which gives me y(x). $\endgroup$ – Mateus Sep 19 '17 at 17:56
  • $\begingroup$ Carl's question focuses on the fact that there is not a unique value for y[0.04]. In US lingo, we say the graph fails the Vertical Line Test and does not define y as a function of x. $\endgroup$ – Michael E2 Sep 19 '17 at 18:13
  • $\begingroup$ Actually, I have my "y" and I want my "x" for this specific "y". $\endgroup$ – Mateus Sep 19 '17 at 18:17
0
$\begingroup$
data = Import["/Users/roberthanlon/Downloads/cD7ACXNZ.txt", "Table"];

As stated in the comments, your y is not a function of x since it is not single-valued. To form a single-valued function reverse the data point values, i.e., look at {y, x} rather than {x, y}.

data2 = Reverse /@ data;

f = Interpolation[data2];

{ymin, ymax} = MinMax[data2[[All, 1]]];

Plot[f[y], {y, ymin, ymax}, PlotRange -> All]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks Rob Hanlon. Problem solved. $\endgroup$ – Mateus Sep 20 '17 at 17:44

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.