How can I find the coeficients alpha, beta of the simple linear regression, using "\" operator
1 回表示 (過去 30 日間)
古いコメントを表示
How can I find the coeficients alpha, beta for the X coordinates of the simple linear regression, using "\" operator?
0 件のコメント
回答 (1 件)
Torsten
2022 年 12 月 10 日
x = (0:0.1:1).';
y = 3*x + 4 + 0.01*randn(numel(x),1);
A = [x,ones(size(x))];
b = y;
coeffs = A\b;
coeffs(1)
coeffs(2)
参考
カテゴリ
Help Center および File Exchange で Linear and Nonlinear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!