corr
Linear or rank correlation.
📝Syntax
rho = corr(X)
rho = corr(X, Y)
[rho, pval] = corr(...)
[rho, pval] = corr(..., Name, Value)
📄Description

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.

💡Examples
X = [1 2 3; 2 4 1; 3 NaN 2; 4 8 4; 5 10 5];
rho = corr(X, 'Rows', 'pairwise')
🔗See Also
corrcoefcovtiedrank
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub