Extract points from an interpolated curve (not a function)

In summary, the conversation discusses using Mathematica to extract points from a curve represented by a set of data points. The individual is having trouble with the interpolation and plotting, but realizes the issue is with specifying the order of interpolation. They ultimately decide to export the points to MATLAB for further analysis.
  • #1
member 428835
Hi PF!

I have the given data points here
Code:
data = 
{{1.92, 0.74}, {2.32, 1.36}, {2.44, 1.88}, {2.52, 2.08}, {2.68, 
  1.92}, {2.64, 1.4}, {2.46, 0.78}};

and the following plots the correct interpolation

Code:
Show[{ListLinePlot[{data}, InterpolationOrder -> 3], 
  ListPlot[\[Lambda]cplx1]}]
Screen Shot 2021-01-13 at 2.25.10 PM.png

but I don't know how to extract points along this curve. If I try this

Code:
f = Interpolation[data];
Plot[f[x], {x, 1.92, 2.6}]
the plot is terrible:
Screen Shot 2021-01-13 at 2.25.18 PM.png


Any ideas how to extract several points from the correct function?
 
Physics news on Phys.org
  • #2
It looks like the data points represent a curve in a 2D space parameterized by a single unspecified parameter. So the points are {x[t],y[t]} with t unspecified.

Then your interpolation is y[x].
 
  • Like
Likes member 428835
  • #3
Just thought this exact point! Got it working now, thanks Dale!
 
  • Like
Likes Dale
  • #4
joshmccraney said:
Just thought this exact point! Got it working now, thanks Dale!
What is your new code?
 
  • #5
Dale said:
What is your new code?
My ultimate goal was to import into MATLAB. I was having difficulties with the interpolation, but realized (as you pointed out) that the plots didn't know which order to interpolate, and that including the third coordinate does so nicely. So I did not use Mathematica for plotting, but exported the points into MATLAB. Thanks so much for your help!
 

1. How can I extract specific points from an interpolated curve?

In order to extract points from an interpolated curve, you will need to have the coordinates of the curve's data points. Once you have those coordinates, you can use a mathematical formula or software program to calculate and extract the specific points you need.

2. Is it possible to extract points from an interpolated curve that is not a mathematical function?

Yes, it is possible to extract points from an interpolated curve that is not a mathematical function. Interpolation is a method used to estimate data points based on known values, even if the curve is not a function. However, the accuracy of the extracted points may vary depending on the quality of the original data and the interpolation method used.

3. Can I use software to extract points from an interpolated curve?

Yes, there are various software programs that can extract points from an interpolated curve. Some popular options include MATLAB, Python, and Excel. These programs have built-in functions and tools specifically designed for interpolation and data extraction.

4. What is the difference between interpolation and curve fitting?

Interpolation and curve fitting are both methods used to estimate data points. However, interpolation involves estimating points within an existing data set, while curve fitting involves finding a function that best fits the data points. In other words, interpolation assumes that the data points are accurate, while curve fitting allows for some degree of error.

5. Are there any limitations to extracting points from an interpolated curve?

Yes, there are a few limitations to keep in mind when extracting points from an interpolated curve. First, the accuracy of the extracted points may be affected by the quality and consistency of the original data. Additionally, the interpolation method used can also impact the accuracy of the extracted points. It is important to carefully consider the data and interpolation method to ensure the best results.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
5K
Replies
4
Views
2K
Back
Top