Is there any way to calculate R^2 (correlation coefficient) in Matlab directly?

3 ビュー (過去 30 日間)
Riyadh Muttaleb
Riyadh Muttaleb 2016 年 6 月 14 日
編集済み: the cyclist 2016 年 6 月 15 日
I would like to calculate R^2 in easy way in matlab? How can I do that?
Thanks in advance
Riyadh

採用された回答

the cyclist
the cyclist 2016 年 6 月 14 日
The corrcoef function calculates correlation.
  3 件のコメント
the cyclist
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.
Riyadh Muttaleb
Riyadh Muttaleb 2016 年 6 月 15 日
編集済み: Riyadh Muttaleb 2016 年 6 月 15 日
Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by