how to find cross correlation of two column vector

3 vues (au cours des 30 derniers jours)
kavya saxena
kavya saxena le 5 Jan 2013
hi all, i have a problem to calculating cross correlation of two column vector which contains displacement of nodes at start and at end. i hv to calculate the time lag between them and plot that cross correlation against time..i did t=input(:,1); u1=input(:,2); u2=output(:,2); cc=xcorr(u1,u2); now how would i plot cc verses t, and how i find the time lag. plz help me

Réponse acceptée

Greg Heath
Greg Heath le 7 Jan 2013
The cross-correlation function is not a function of time. It is a function of time difference. In other words LAG. I don't have xcorr. However, the traditional approach has lag = -(Lmin-1):(Lmin-1) where Lmin = min(length(u1),length(u2));
I find the scaling
cc = xcorr(zscore(u1,1),zscore(u2,1))
to be convenient.
Hope this helps.
Thank you for formally accepting my answer.
Greg
  1 commentaire
kavya saxena
kavya saxena le 11 Jan 2013
hi Gerg thanks for reply. actully i wnt to know tht how this lag can be determined.what will be the value of maxlag in terms of time. my both column vectors are of same length which start from zero to 3 microsecond with 0.05microsec time interval. i hv nodal displacement values at two different nodes in this time sequence. how would i can find the time difference between two nodes or i can say the time lag between them. help me to calculate this.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by