MATLAB: How to calculate the correlation coefficient of two data sets ( containing dates)

coorcoefcorrelation coefficientdates settime series

I have to column arrays which containing dates…
I want to calculate the correlation coefficient between column A and column B
I use this code :
but it didn't work. it seems that i have first to convert dates to numbers
any idea on how i could calculate the correlation coefficient between A & B ?

Best Answer

You can use the datenum command to convert dates to numeric.