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 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by