FUNCTION REFERENCE

corrcoef

Correlation coefficients.

Correlation coefficients.

Syntax

R = corrcoef(x)

Syntax

R = corrcoef(x, y)

Columns of x are variables and rows observations; corrcoef(x, y) uses x(:)

and y(:). The diagonal is exactly 1, off-diagonal values are limited to

[-1, 1], and a constant variable gives NaN.

Example

corrcoef([1 2 3 4], [2 4 6 9])   % [1 0.9944; 0.9944 1]

Differences from MATLAB: the p-value and bound outputs and the 'alpha' and

'rows' options are not supported yet; complex input is not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.