Home > NaN > cor.m

cor

PURPOSE ^

COR calculates the correlation matrix

SYNOPSIS ^

function [r2] = cor(X,Y);

DESCRIPTION ^

 COR calculates the 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

 c = COR(...);
     c is the correlation matrix

 W    weights to compute weighted mean (default: [])
    if W=[], all weights are 1. 
    number of elements in W must match size(x,DIM)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:02:45 by m2html © 2003