- X = [ ones(N,1) airqual(:,[18 19 20]) sin(Wd) cos(Wd) airqual(:,22)]*
Where is the intercept in regress
12 次查看(过去 30 天)
显示 更早的评论
When you use the "regress" function, where is the intercept?
0 个评论
采纳的回答
ARS
2013-6-7
Hi,
In my limited knowledge, you will have to include a very first column of 'ones' in the independent variables side(matrix). Then use regress function and the very first beta coefficient will be the intercept.
An example is available here:
click on 'Regress' on the page and you will notice "ones" function:
Hope it helps.
Thanks.
更多回答(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!