Find position of smaller waveform within a longer noise waveform.
2 次查看(过去 30 天)
显示 更早的评论
I am searching for a short waveform within a longer noisy waveform. What is the best way to find the location within the longer waveform of the best fitting match to the short waveform? I have played with xcorr and conv and look for position of maximum value, but translating from the position in the xcorr result to the position in the long waveform is causing me problems. I also have problems if the amplitude in the long waveform varies widely from position to position.
4 个评论
回答(1 个)
Roshin Kadanna Pally
2012-4-19
You can try the following:
Normalize your sequences as shown below:
v = (v - mean(v))/std(v,1);
Make the two sequences of equal length by zero padding and use:
[C,lag] = xcorr(v,vmatch,'unbiased')
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!