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!