Finding equation parameters from data set?

27 vues (au cours des 30 derniers jours)
Emanuele Joy
Emanuele Joy le 31 Mai 2018
Réponse apportée : KSSV le 31 Mai 2018
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?

Réponses (1)

KSSV
KSSV le 31 Mai 2018

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!

Translated by