It is already taking me days to understand the xcorr function and I am not able to get it :(!
x1=[5 4 2.5 0.5 0 0.5 2.5 4 5 5 5]
x2=[0 0.5 2.5 4 5 5 5]
plot(y1) gives me:
First I thought: GREAT!
But why is the highest correlation on 15, I wrote down 100 of notes to figure it out. All I need is the location on x1 where the correlation is the highest.
In my actual dataset x1 is deoxygenation during exercise (first down during exercise, then mono-exponentially up in recovery). My x2 is a monoexponential shaped curve, in this way I want to find the response time, the point where the data is shaped mono-exponential.
Maybe the answer is easy, which would save me lots of frustrations!
Thanks in advance