필터 지우기
필터 지우기

How to write a cross signal function and apply it to the signals?

조회 수: 1 (최근 30일)
Kennard Ng
Kennard Ng 2019년 2월 12일
편집: Kennard Ng 2019년 2월 12일
xDataA = linspace(0,4*pi,1024); % create signal
yDataA = cos(xDataA); % array A
xDataB = linspace(0,4*pi,1024); % create signal
yDataB = sin(xDataB); % array B
p = yDataA.*yDataB ; % product of array A and B
r = xcorr(yDataA,yDataB);
plot (r);
Is this how it is done?

답변 (1개)

Star Strider
Star Strider 2019년 2월 12일
This looks like homework.
See the documentation on the xcorr (link) function. That will either solve your problem or get you started on writing your own function.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by