필터 지우기
필터 지우기

How to get the R (not R^2) from a linear regression 'poly1'?

조회 수: 3 (최근 30일)
Cheng Zhang
Cheng Zhang 2021년 11월 7일
편집: the cyclist 2021년 11월 8일
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?

채택된 답변

the cyclist
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개)

카테고리

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