📄 spearmanrrows.m
字号:
function r=spearmanrrows(x)
% function r=spearmanrrows(x)
% return Spearman Rank Correlation matrix
% can only give the correlation of the rows!
% Requires the Spearman Rank matrix to be applied rows,
% or the program will give absurd result.
% NEVER apply this program on collums!
[m n]=size(x);
r=zeros(m,n);
for i=1:m-1
for k=i+1:m
sum=0;
for j=1:n
temp=(x(i,j)-x(k,j))^2;
sum=sum+temp;
end
r(k,i)=1-6*sum/(n^3-n);
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -