필터 지우기
필터 지우기

similarity between closely related signals

조회 수: 2 (최근 30일)
Sajid Afaque
Sajid Afaque 2021년 12월 9일
댓글: Sajid Afaque 2021년 12월 9일
Hello Community,
I have two signals taken over same time samples. (acti.mat & phs0.mat)
how do i find out the time instant till which both signals are closely same (quantatively very close and shape similar).
like for example visually i can find that till 21.2ns the signals are similar
figure
>> plot(acti(:,1),acti(:,2))
>> hold on
>> plot(phs0(:,1),phs0(:,2))
How can i find this time instant directly ?
I do not know the excat use of corrcoef or xcorr here.

채택된 답변

Net Fre
Net Fre 2021년 12월 9일
You can create a vector calculating the difference between the two, and then find the first index where it is larger than a specific threshold:
MyDifference = abs(acti(:,2)-phs0(:,2)); % calculate the absolute error between corresponding elements.
MyThreshold = 1; % or whatever number you want.
find(Mydifference>=Mythreshold,1) %find first difference that is bigger than MyThreshold
Theoretically you could use:
find(Mydifference~=0,1)
But in your attachments the values aren't exactly zero so you would need to determine what difference is to big for you.
  댓글 수: 1
Sajid Afaque
Sajid Afaque 2021년 12월 9일
I have a window(signal for a particular duration), say part of phs0.mat how do I find this part in acti.mat , the best fit region in acti.mat

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by