필터 지우기
필터 지우기

Add Limits Around Plot

조회 수: 2 (최근 30일)
Matthew Tourtelot
Matthew Tourtelot 2016년 6월 14일
답변: Star Strider 2016년 6월 14일
Using the data set shown in the plot below, I would like to insert a line above and below the steps in the plot by +/-0.05 and return the data points associated with these lines. Basically, I want to keep the limit lines and plot different data sets inside of these lines.
I've tried to +/- 0.05 to the data and plot, as well as, attempt to find the steps in the plot, but because of the high frequency, I wasn't able to get the result I want. Is there a way to plot the lines with a lower frequency so it just catches the big picture steps?
Zoomed in:

답변 (1개)

Star Strider
Star Strider 2016년 6월 14일
I would use either the envelope function (also ‘abs(hilbert(signal))’) or the Savitzky-Golay filter function sgolayfilt.
To use either of those, you will probably have to do it twice, first on the signal as it currently exists, then on the negative of the signal. Use the ‘negative of the negative’ result to plot the lower boundary. You can add or subtract small offsets to get the result you want.
Everything in signal processing requires experimentation, so you will most likely have to tweak the function parameters a few times.

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by