Equation of nonlinear data

6 ビュー (過去 30 日間)
Rick
Rick 2014 年 9 月 16 日
回答済み: Alex Sha 2019 年 6 月 4 日
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 Center および File ExchangeCurve Fitting Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by