Equation of nonlinear data
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
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?
Réponse acceptée
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
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.
Plus de réponses (1)
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
0 commentaires
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression 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!