Finding x value for given y in a zig-zag data.

조회 수: 1 (최근 30일)
JAMMI ASHOK
JAMMI ASHOK 2020년 8월 29일
답변: Star Strider 2020년 8월 29일
I have a data which oscillates around x-axis. How can I get x values for a given y value. I can get as many, I will sort the one required.
Thank you.

채택된 답변

Star Strider
Star Strider 2020년 8월 29일
Use findpeaks (with the original and negative of your data), or islocalmax and islocalmin, to get the peaks and valleys, then for each of those segments, use interp1 to get the x-values for a y-value in each segment.
This obviously requires a loop. There is no alternative.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by