How does the regress function work in Matlab?

11 ビュー (過去 30 日間)
Sophie Chumas
Sophie Chumas 2020 年 1 月 14 日
コメント済み: Sophie Chumas 2020 年 1 月 15 日
Hi!
Just wondering if anyone knows the theory behind how matlab computes the beta matrix?
Here is some example code:
x1 = pure_time;
x2 = pure_temp;
y = strength;
X = [ones(size(x1)) x1 x2 x1.*x2];
b = regress(y,X);
mod_strength = b(1) + (b(2)*x1) + (b(3)*x2) + (b(4)*x1.*x2);
What is Matlab doing to get b(1), b(2), b(3) and b(4) values?
Thanks! :)
  2 件のコメント
dpb
dpb 2020 年 1 月 14 日
Simply solving the OLS equations for the model given by the design matrix X
Sophie Chumas
Sophie Chumas 2020 年 1 月 15 日
Thanks!! This article is great.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by