Applying linear regression to estimate coefficients
2 ビュー (過去 30 日間)
古いコメントを表示
According to the question that I attached it is asked to linearize a group of data and applying linear regression.
So I have written this code below:
c=[0.5 0.8 1.5 2.5 4]
k=[1.1 2.5 5.3 7.6 8.9]
A=[length(c) sum(c);sum(c) sum(c.^2)];
C=[sum(k);sum(c.*k)];
B=inv(A)*C
and the output is:
B =
0.9757
2.2066
So I have found the a0 and a1 values.(estimated linear func:a0+a1=y)
I think I have linearized(?), what method should I use to create a function estimates kmax and cs values?
thank you so much!
0 件のコメント
回答 (0 件)
参考
カテゴリ
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!