How to obtain R square value
이전 댓글 표시
Hi all,
coefficientsold = polyfit(AAT,QErot1,1)
Ygg=polyval(coefficientsold,AAT)
figure
axis([-10 80 0 15])
plot(AAT,QErot1,'s',AAT,Ygg,'--','MarkerFaceColor',[0 0 0])
By using this code what I obtain is a linear equation that fits my data, but I am not able to obtain the R-square value.
I would be glad if you could tell be how to obtain the r-square value, if it is possible by the use of the regress function, because I am not able to understand the use of this function properly.
Thank you very much
Andoni
채택된 답변
추가 답변 (1개)
Kalpesh Patil
2014년 9월 1일
0 개 추천
correlation_coeff = corr2(Ygg,AAT);
r_sqr = power(correlation_coeff,2);
댓글 수: 4
Andoni Mendialdua
2014년 9월 1일
Andoni Mendialdua
2014년 9월 1일
Iain
2014년 9월 1일
Why do you think that an R-squared value of 1 is wrong?
Are you actually asking for an RMS?
Andoni Mendialdua
2014년 9월 1일
카테고리
도움말 센터 및 File Exchange에서 t Location-Scale Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!