Is there any way to calculate R^2 (correlation coefficient) in Matlab directly?
2 次查看(过去 30 天)
显示 更早的评论
I would like to calculate R^2 in easy way in matlab? How can I do that?
Thanks in advance
Riyadh
0 个评论
采纳的回答
the cyclist
2016-6-14
3 个评论
the cyclist
2016-6-15
编辑:the cyclist
2016-6-15
I'm confused by your comment. For example,
x1 = [1; 2; 3; 4];
x2 = [7; 5; 3; 2];
correlation = corr(x1,x2)
gives a single, negative number for the correlation of these two vectors of numbers.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Industrial Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!