calculates the correlation matrix
nan_cor(X); nan_cor(X,Y); c = nan_cor(...);
correlation matrix
X and Y can contain missing values encoded with NaN. NaN's are skipped, NaN do not result in a NaN output. (Its assumed that the occurence of NaN's is uncorrelated) The output gives NaN only if there are insufficient input data
COR(X); calculates the (auto-)correlation matrix of X
COR(X,Y); calculates the crosscorrelation between X and Y
NOTE: Under certain circumstances (Missing values and small number of samples) abs(COR) can be larger than 1. If you need abs(COR)<=1, use CORRCOEF. CORRCOEF garantees abs(COR)<=1.
http://mathworld.wolfram.com/CorrelationCoefficient.html