?? corr.m
字號:
function rho = corr(x,y)%CORR Correlation coefficient.%% rho = corr(x,y)%% The correlation coeffient is computed between all% columns in x and all coluns in y. If only one% argument x is given then the correlation matrix% for x is returned instead.%% See also CVAR, SPEARMAN.% GPL Copyright (c) Anders Holtsberg, 1998if nargin < 2 c = cvar(x); s = sqrt(diag(c)); rho = c ./ (s*s'); n = size(x,2); rho(1:n+1:n^2) = ones(n,1);else cx = cvar(x); sx = sqrt(diag(cx)); cy = cvar(y); sy = sqrt(diag(cy)); c = cvar(x,y); rho = c ./ (sx*sy');end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -