Equation of nonlinear data

6 vues (au cours des 30 derniers jours)
Rick
Rick le 16 Sep 2014
Hello,
If I have data
rA = [-0.2 -0.0167 -0.00488 -0.00286 -0.00204];
X = [0 0.1 0.4 0.7 0.9];
and I plot
plot(X,-FA0./(rA/60))
xlabel('X')
ylabel('-FA0/rA')
title('FA0/-rA vs. Conversion')
How would I be able to find an equation that represents this non-linear plot? Thanks
I want rA as a function of X
perhaps it would be better visually to see plot(X,rA/60)
which is very nonlinear, but how would I represent this as an equation?
  1 commentaire
Star Strider
Star Strider le 16 Sep 2014
Looks almost perfectly linear to me (with a scalar ‘FA0’), but we’re missing ‘FA0’. Is it a scalar or vector?
Is there a specific process that generated these data that you want to estimate the parameters for? If so, what is it?

Connectez-vous pour commenter.

Réponse acceptée

Stephen23
Stephen23 le 16 Sep 2014
You want to determine a function that matches your data. Doing this really depends on what you know about the data:
  • If you know the underlying function, then use this and fit it using least squares , or some tool from the curve fitting toolbox .
  • If you do not know the function, then model it using a spline or pchip function, using the polynomial output together with unmkpp .
  17 commentaires
Rick
Rick le 20 Sep 2014
Modifié(e) : Rick le 20 Sep 2014
Well, I don't see how they are not one of the same animal. Of course the most suitable mathematical function should best fit the data. This data is monotonic, so a polynomial is not going to be a correct fit. I think a logarithm will better fit the data.
Is there something like logfit, analogous to polyfit??
Stephen23
Stephen23 le 7 Fév 2015
They are a completely different kind of animal. Just like analytic and numeric calculations, they only bear a passing relation to one another.
"Of course the most suitable mathematical function should best fit the data" sounds nice, but in the real world this is hardly guaranteed. It really depends what you mean by "fit": all data measurements are subject to errors, as are the calculations based on them. For any finite set of data values there are going to be precisely an infinite number of functions that could fit it. How on earth should any program "know" that your data is exponential, or linear, or any other convenient function?
"Also, there is no need to repeat yourself regarding the magic tool", sorry, but there is NO magic tool that can identify what function exactly describes the underlying system of behavior of some set of data.

Connectez-vous pour commenter.

Plus de réponses (1)

Alex Sha
Alex Sha le 4 Juin 2019
The model function below is good enough, also very simple:
rA = 1/(p1+p2*x);
Root of Mean Square Error (RMSE): 0.000219178990662495
Sum of Squared Residual: 2.4019714973915E-7
Correlation Coef. (R): 0.999997155861087
R-Square: 0.999994311730263
Adjusted R-Square: 0.999988623460527
Determination Coef. (DC): 0.999992008454451
Chi-Square: -2.91785095249027E-5
F-Statistic: 375968.944829523
Parameter Best Estimate
---------- -------------
p1 -5.00002149728568
p2 -543.303262063525
c174.jpg

Catégories

En savoir plus sur Curve Fitting Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by