How to calculate linear correlation between two time series in MATLAB

  • Topic: MATLAB 
  • Thread starter Tone L
  • Start date
  • Tags Tags
    correlation
1 reply · 2K views · last reply
Tone L
Messages
72
Reaction score
7
Hello I have to variables X and Y, 50,000 in each row (a time series of 2 years). I am curious how to calculate a linear correlation between the two, for example if X decreases does Y increase or decrease.

Looking for formula or a MATLAB function :)