How to substract/add 2 signals which have different phase?
6 ビュー (過去 30 日間)
古いコメントを表示
Currently, I want to finding the different of 2 signals in Timedomain. The data is time and amplitude.
I have tried xcorr function with fft, but I cannot find how to do the phase shift with xcorr to make 2 signals in phase and then I can substract them.
It is hard to represent the signal by cosine function, so I really want to find the solution directly by data.
The attachment is my 2 data sets.
Here is how I do as suggestion from other thread:
[c,lags]=xcorr(Y1,Y2);
[~,iLag]=max(c(find(lags==0):end));
s3=circshift(Y2,[0 iLag]);
2 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!