Find the increasing and decreasing point in array?
古いコメントを表示
I have an array. Which is increasing. At one point it starts decreases.
This trend starts repeating many times in array. How to find that point in array where the trend starts?
1 件のコメント
Image Analyst
2014 年 2 月 20 日
Define "trend". Is it the start of the first increasing part of a signal where you have many rising/falling sections? Maybe you can post a screenshot of your data plotted and point out the element that you say the "trend" starts at.
採用された回答
その他の回答 (1 件)
Image Analyst
2014 年 2 月 20 日
Use the diff() function
differences = diff(yourArray);
increasing values will be positive and decreasing values will be negative.
カテゴリ
ヘルプ センター および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!