Finding equation parameters from data set?

14 次查看(过去 30 天)
I have a data set of x and y:
x = [2.0, 2.5, 3.0, 3.5, 6.0, 6.1, 8.5, 8.6, 9.9, 10.0];
y = [0.001, 0.006, 0.032, 0.180, 1E3, 2E3, 5.6E6, 8E6, 5E8, 1E9];
I'm looking to do different polynomial fits (linear, quadratic, exponential, power, logarithmic) from this data, but I need to know the equation constants/parameters (like slope and intercept) before I can fit them.
For example, a linear equation takes the form "y = m*x + b", and I want to know "m" and "b". Same with quadraatic equation, y = a*x^2 + b*x +c, I want to know a, b, and c. How do I solve for these given the data and built-in MATLAB functions? Do I have to use a matrix operation of some kind?

回答(1 个)

KSSV
KSSV 2018-5-31

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by