I am looking for the delay code for slicing the signals

조회 수: 1 (최근 30일)
Rahul Pandit
Rahul Pandit 2022년 12월 26일
댓글: Mathieu NOE 2023년 1월 2일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by