MATLAB Answers

0

How to calculate correlation coefficient for two time series signal x(t) and y(t)?

Asked by Deepika Behmani on 24 Aug 2019 at 13:46
Latest activity Commented on by Deepika Behmani on 25 Aug 2019 at 5:31
I have two time series signal in csv file which contain 1 million data point. I want to find out normalized cross correlation coefficient for these two signal . How can i do?

2 Answers

Answer by David Hill on 24 Aug 2019 at 19:49
 Accepted Answer

I believe you just need to read the files into vectors (x and y) and then use the xcorr function.
x = readmatrix('x.csv');
y = readmatrix('y.csv');
[c,lags] = xcorr(x,y);
Now if you want to visualize.
stem(lag,c)

  0 Comments

Sign in to comment.


Answer by Deepika Behmani on 25 Aug 2019 at 5:30

Hi David ,
Actually i have tried this method what you suggested but if i want to do normalized correlation then what change i should make?

  0 Comments

Sign in to comment.