How to get the mean of a staircase graph?
2 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!