Extract points from an interpolated curve (not a function)

  • Context: Mathematica 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Curve Function Points
Click For Summary

Discussion Overview

The discussion revolves around extracting points from an interpolated curve based on a set of given data points. Participants explore methods for interpolation and the challenges faced in visualizing the results, particularly in the context of using different software tools like Mathematica and MATLAB.

Discussion Character

  • Exploratory, Technical explanation, Homework-related

Main Points Raised

  • One participant presents a set of data points and seeks advice on how to extract points along an interpolated curve.
  • Another participant suggests that the data points represent a curve parameterized by an unspecified parameter, indicating a relationship between x and y.
  • A participant expresses that they resolved their issue with interpolation after receiving clarification, although the specific solution is not detailed.
  • A later reply indicates that the participant's ultimate goal was to import the interpolated points into MATLAB, noting difficulties with interpolation in Mathematica and mentioning the importance of including a third coordinate for successful plotting.

Areas of Agreement / Disagreement

Participants generally agree on the nature of the data points and the challenges of interpolation, but specific methods and software preferences remain varied and unresolved.

Contextual Notes

There are limitations regarding the unspecified parameter in the curve representation and the dependence on software capabilities for interpolation and plotting.

Who May Find This Useful

This discussion may be useful for individuals interested in data interpolation techniques, particularly in the context of using Mathematica and MATLAB for visualizing and exporting data points.

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
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   Reactions: member 428835
Just thought this exact point! Got it working now, thanks Dale!
 
  • Like
Likes   Reactions: Dale
joshmccraney said:
Just thought this exact point! Got it working now, thanks Dale!
What is your new code?
 
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!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
1
Views
2K