I am looking for the delay code for slicing the signals
1 view (last 30 days)
Show older comments
I have two 5Sec signals and i want to do the cross corelation of both the signals.
a = xlsread(signals 5sec.xls);
t1 = a(:,1); %time (Time is same for both the signal)
yR1 = a(:,2); % 1st signal
yR2 = a(:,4); % 2nd signal
% Cross Correlation
[r,lags] = xcorr(yR1,yR2);
plot(lags,r,'color','r','linewidth',1.6);
But i want to do the delay of 1 sec and then do the cross correlation using the for loop, i must to iterate the signals 1sec to 5sec for 1st signal and same thing i have to repeate in negative direction also. so i can get the neagtive and positive both the pulses.
Please help me to grow my self.
Thank You
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!