Finding equation parameters from data set?

21 visualizzazioni (ultimi 30 giorni)
Emanuele Joy
Emanuele Joy il 31 Mag 2018
Risposto: KSSV il 31 Mag 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?

Risposte (1)

KSSV
KSSV il 31 Mag 2018

Categorie

Scopri di più su Linear and Nonlinear Regression in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by