필터 지우기
필터 지우기

How to get the mean of a staircase graph?

조회 수: 3 (최근 30일)
Sohel Rana
Sohel Rana 2022년 2월 8일
편집: John D'Errico 2022년 2월 8일
I'm just wondering if it is possible to get the mean of a staircase graph where the values for y-axis are almost same. For example, I would like to find the mean value of y-axis data between two red dotted line (image below). I would like to get the mean where y-values are almost same. The data size is large and to get the mean value manually would be time consuming. I hope there is a way to find it out.

답변 (1개)

John D'Errico
John D'Errico 2022년 2월 8일
편집: John D'Errico 2022년 2월 8일
You don't give your actual data, just a pcture of it. Yes, sometimes a picture is worth a thousand words, but pictures are not worth a thousand numbers. :) A fellow named Mark may argue that point with me. :)
If I wanted to do this, I'd probably use a scheme where I would compute a moving estimate of the slope. Essentially, a variation of Savitsky-Golay filter would do. So at each point in the time series, I would implicitly fit a linear polynomial through the curve. Now I would look for the regions where the slope is uniformly small over a region. Then compute the mean over that interval.
No data, so no way to show you how to do it on your data. Yes. I could make up some data. Do I really want to think? Nah.

카테고리

Help CenterFile Exchange에서 Graphics Object Identification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by