how do you make a function out of a graph

10 vues (au cours des 30 derniers jours)
Mohammed Rauf
Mohammed Rauf le 24 Nov 2017
Réponse apportée : dpb le 24 Nov 2017
I got the x points and the y points, so basically a graph. I need to make a function y(x) out of it. I know it is more of a math question but hoped I could get some help anyway. Thanks in advance.
  1 commentaire
Stephen23
Stephen23 le 24 Nov 2017
@Mohammed Rauf: there are infinite possible functions that exactly fit any finite set of data points. Which of those infinite functions do you want?
You basically have a choice between:
  1. you know something about the underlying physical process and have a mathamtical model, in which case search for "MATLAB curve fitting".
  2. you do not know the underlying physical process or it is too complex, in which case search for "MATLAB splines".

Connectez-vous pour commenter.

Réponse acceptée

dpb
dpb le 24 Nov 2017
See <Parametric Fitting> . It's essentially finding a rational model that fits the data; if you know something about underlying physics that can help derive a functional form that's all to the good.
If purpose is building a model, then the above is pretty-much the toolset; if the purpose is to simply interpolate existing data then splines or least-squares smoothing splines may be useful.
Begin, of course, by plotting the data to see what it looks like...

Plus de réponses (0)

Catégories

En savoir plus sur Spline Postprocessing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by