Finding equation parameters from data set?

28 ビュー (過去 30 日間)
Emanuele Joy
Emanuele Joy 2018 年 5 月 31 日
回答済み: KSSV 2018 年 5 月 31 日
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 Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by