How to get the R (not R^2) from a linear regression 'poly1'?
3 次查看(过去 30 天)
显示 更早的评论
When I use
[f,gof,output] = fit(x,y,'poly1')
I can get
gof =
struct with fields:
sse: 0.3126
rsquare: 0.9843
dfe: 1
adjrsquare: 0.9686
rmse: 0.5591
Is that possible to get the coefficient r as well, not the square of coefficient?
0 个评论
采纳的回答
the cyclist
2021-11-8
编辑:the cyclist
2021-11-8
Assuming you just want the correlation coefficient of the data, you don't need the model:
corrcoef(x,y)
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!