Download Help (Windows Only) 
Owning Classes: spectral analysis and statistics
Requires: MathScript RT Module
r = corrcoeff(x)
r = corrcoeff(x, y)
[r, p, rlo, rup] = corrcoeff(x, 'alpha', a, 'rows', s)
[r, p, rlo, rup] = corrcoeff(x, y, 'alpha', a, 'rows', s)
Legacy Name: corrcoef
Computes the correlation coefficients.
Name  Description  

x  Specifies observations for each variable. If you specify r = corrcoeff(x), x can be real or complex. If you specify [r, p, rlo, rup] = corrcoeff(x, 'alpha', a, 'rows', s), x must be real. x is a vector or matrix. If x is a vector, each element in x is an observation. If x is a matrix, each row in x is an observation, and each element in the row is data for that observation.  
y  When x is a vector, y specifies the data values for each observation in x. When x is a matrix, you cannot specify y. y is an array of the same length as x.  
'alpha'  Tells LabVIEW that the next listed input is a.  
a  Specifies the confidence level 1a. a is a real number in the interval [0, 1]. The default is 0.05.  
'rows'  Tells LabVIEW that the next listed input is s.  
s  Specifies how to handle values of NaN in x. s is a string that accepts the following values.

Name  Description 

r  Returns the correlation coefficients. 
p  Returns the pvalues for the null hypothesis. p is a matrix. 
rlo  Returns the lower bound for the confidence interval of each coefficient. rlo is a matrix. 
rup  Returns the upper bound for the confidence interval of each coefficient. rup is a matrix. 
If you specify both inputs x and y, LabVIEW computes the correlation coefficients according to the following equation: r = corrcoeff([x(:), y(:)]).
The following table lists the support characteristics of this function.
Supported in the LabVIEW RunTime Engine  Yes 
Supported on RT targets  Yes 
Suitable for bounded execution times on RT  Not characterized 
R = corrcoeff(rand(5, 6))
R = corrcoeff(rand(5, 1), rand(5, 1))
[R, P, RLO, RUP] = corrcoeff(rand(5, 6))
Helpful
Not Helpful