Segmenting data based on multiple min and max value

조회 수: 2 (최근 30일)
az
az 2019년 6월 20일
댓글: az 2019년 6월 20일
Hello, I have the following xlsx file (x,y). I want to separate every section of the curve ( 4 downard, 4 upward) part separate data file so that I can plot as different curve and merge them. So could anyone please suggest, how can I do segmentation based on multiple minima or maxima.
Thank you
Capture.PNG
  댓글 수: 3
infinity
infinity 2019년 6월 20일
Hello,
Here is my idea.
First, we can sort the data such that x increases from 0 to 3 if your data have not already been sorted.
Then, we find the maximum value of y for x > 1 if we did not know it.
To find the maximum of y for x within [1 3], you can just
  1. store your data with another varibale, let say "temp", in which x > 1.
  2. use max fucntion for "temp"
When you have this value, you can use "for" and "if" to split what you want.
Best regards,
Trung
az
az 2019년 6월 20일
Thanks Trung, the problem is not all my other data that I have goes a fixed minima like 0 or a fixed maxima, I have to segment data based on local min and max.

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

답변 (1개)

KSSV
KSSV 2019년 6월 20일
Read about findpeaks. It will give indices and values of the maximas. From the indices you take next and before values.
  댓글 수: 1
az
az 2019년 6월 20일
Hello , Here is the data file. I have found this website, But I do not know how to calculate slope threshold and Amplitude threshold.
Thankyou all.

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

카테고리

Help CenterFile Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by