xcorr results: c written in long format, lags in wide format
I want to calculate the cross-correlation between ankle and hip movement.
My data are organised in a structure: model.filt.modelOutputs with 12500×3 matrices.
I attached an example file with only the filtered Ankle and Hip angles.
The data contains several movement cycles which can be identified by the starting frames stored in tStart.
When I use [c, lags] = xcorr, I get c as 1301×1 double and lags as 1×1301 double.
Can anyone explain, why this happens? When I use different example vectors, both results have the same orientation.
This is the part of my code, which reproduces the results::
load modelExample.mat
tStart = [1,611,1261];
[c, lags] = xcorr(modelExample.filt.RAnkleAngles(tStart(2):tStart(3),2), modelExample.filt.RHipAngles(tStart(2):tStart(3),2), ‘normalized’);I want to calculate the cross-correlation between ankle and hip movement.
My data are organised in a structure: model.filt.modelOutputs with 12500×3 matrices.
I attached an example file with only the filtered Ankle and Hip angles.
The data contains several movement cycles which can be identified by the starting frames stored in tStart.
When I use [c, lags] = xcorr, I get c as 1301×1 double and lags as 1×1301 double.
Can anyone explain, why this happens? When I use different example vectors, both results have the same orientation.
This is the part of my code, which reproduces the results::
load modelExample.mat
tStart = [1,611,1261];
[c, lags] = xcorr(modelExample.filt.RAnkleAngles(tStart(2):tStart(3),2), modelExample.filt.RHipAngles(tStart(2):tStart(3),2), ‘normalized’); I want to calculate the cross-correlation between ankle and hip movement.
My data are organised in a structure: model.filt.modelOutputs with 12500×3 matrices.
I attached an example file with only the filtered Ankle and Hip angles.
The data contains several movement cycles which can be identified by the starting frames stored in tStart.
When I use [c, lags] = xcorr, I get c as 1301×1 double and lags as 1×1301 double.
Can anyone explain, why this happens? When I use different example vectors, both results have the same orientation.
This is the part of my code, which reproduces the results::
load modelExample.mat
tStart = [1,611,1261];
[c, lags] = xcorr(modelExample.filt.RAnkleAngles(tStart(2):tStart(3),2), modelExample.filt.RHipAngles(tStart(2):tStart(3),2), ‘normalized’); xcorr MATLAB Answers — New Questions