필터 지우기
필터 지우기

How can I segment a time series signal?

조회 수: 5 (최근 30일)
Andre
Andre 2014년 2월 21일
댓글: Image Analyst 2014년 2월 22일
Hi,
Any idea how can I break a signal like on this picture?
I have a sine wave segment, then noise, then another sine (different in amplitude and phase from the first one), another noise segment, and then the continuation of the first sine.
Thanks.
Andre
  댓글 수: 3
Paul
Paul 2014년 2월 22일
Im pretty sure he just wants to plot the red lines to indicate the segments. Andre you can use the command line for this. See:
doc line
Image Analyst
Image Analyst 2014년 2월 22일
Make it easy for us to help you. Attach an m-file that will produce the signal you show.

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

채택된 답변

Image Analyst
Image Analyst 2014년 2월 22일
Do you have the Signal Processing Toolbox? The noisy segments can be detected by fitting the signal to a 5th order polynomial in a sliding window which is what the Savitzky-Golay filter does. Then subtract the sg-filtered signal from the original and threshold to find elements that are above some threshold - those will be the noisy regions.
You can find tall and short sine wave segments just by taking the RMS value of the signal. Tall segments will have a higher RMS and lower segments will have a lower RMS.
signalSquared = signal.^2
rms = conv(signalSquared, ones(1, windowWidth), 'same');
  댓글 수: 2
Andre
Andre 2014년 2월 22일
Nice,
thank you very much Image Analyst,
gotta one more question about this.
Do you have any idea how can i get the differences between the phases of the two signals (first SIN, and the SIN after the first noise) ?
Andre
Image Analyst
Image Analyst 2014년 2월 22일
You could find the peaks, perhaps with findpeaks(), and then look at where the "after" peaks are with respect to where the "should" be.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by