相关矩阵 MATLAB

发布于 2024-10-18 11:56:32 字数 402 浏览 0 评论 0原文

您是否知道一个 matlab 脚本,它可以获取一组数据的相关矩阵,例如列数 = 7,行数 = n>>7

 x1      x2      x3      x4     x5     x6      x7 

0.780   2.042   2.754   2.894  5.000  5.000  5.000
0.767   0.816   2.758   2.898  5.000  1.644  1.626
0.816   0.836   1.558   2.124  2.952  5.000  5.000
0.848   0.871   1.588   2.147  2.966  5.000  5.000
1.378   1.620   1.433   2.567  3.268  3.203  5.000
....

Do you know a matlab script that gets the correlation matrix of a set of data like numbe of columns=7, and rows = n>>7

 x1      x2      x3      x4     x5     x6      x7 

0.780   2.042   2.754   2.894  5.000  5.000  5.000
0.767   0.816   2.758   2.898  5.000  1.644  1.626
0.816   0.836   1.558   2.124  2.952  5.000  5.000
0.848   0.871   1.588   2.147  2.966  5.000  5.000
1.378   1.620   1.433   2.567  3.268  3.203  5.000
....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝礼 2024-10-25 11:56:32

尝试corrcoef

一般来说,您可以通过搜索在线帮助立即找到此类内容,例如通过方便的 lookfor 命令:

>> lookfor correlation
corrcoef                       - Correlation coefficients.
msfuncorr                      - an M-S-function which performs auto- and cross-
...

>> help corrcoef
CORRCOEF Correlation coefficients.
   R=CORRCOEF(X) calculates a matrix R of correlation coefficients for
   an array X, in which each row is an observation and each column is a
   variable.

例如

load file.txt
result= CORRCOEF(file);

Try corrcoef.

In general, you can find these sort of things immediately by searching the online help, for example via the convenient lookfor command:

>> lookfor correlation
corrcoef                       - Correlation coefficients.
msfuncorr                      - an M-S-function which performs auto- and cross-
...

>> help corrcoef
CORRCOEF Correlation coefficients.
   R=CORRCOEF(X) calculates a matrix R of correlation coefficients for
   an array X, in which each row is an observation and each column is a
   variable.

For instance

load file.txt
result= CORRCOEF(file);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文