Equation of nonlinear data

4 次查看(过去 30 天)
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 个评论
Star Strider
Star Strider 2014-9-16
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?

请先登录,再进行评论。

采纳的回答

Stephen23
Stephen23 2014-9-16
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 个评论
Rick
Rick 2014-9-20
编辑:Rick 2014-9-20
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 2015-2-7
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.

请先登录,再进行评论。

更多回答(1 个)

Alex Sha
Alex Sha 2019-6-4
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

类别

Help CenterFile Exchange 中查找有关 Curve Fitting Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by