rho = corr(X)
rho = corr(X, Y)
[rho, pval] = corr(...)
[rho, pval] = corr(..., Name, Value)
corr computes pairwise correlations between columns of X, or between columns of X and Y.
Supported options are Type with pearson, spearman, or kendall; Rows with all, complete, or pairwise; Tail with both, right, or left; and Weights for observation weights.
X = [1 2 3; 2 4 1; 3 NaN 2; 4 8 4; 5 10 5];
rho = corr(X, 'Rows', 'pairwise')
| Version | Description |
|---|---|
| 2.0.0 | initial version |