check for decrease and increase
29 ビュー (過去 30 日間)
古いコメントを表示
i have a matrix and check for a column to see if the values are rapidly decreasing in steps of five. how to check for it? for example the matrix is x and the second column.
0 件のコメント
採用された回答
KSSV
2018 年 11 月 5 日
Read about diff. This will get the difference of successive rows. If decreasing diff would be negative, if increasing diff will be positive.
0 件のコメント
その他の回答 (3 件)
madhan ravi
2018 年 11 月 5 日
編集済み: madhan ravi
2018 年 11 月 5 日
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
0 件のコメント
Image Analyst
2018 年 11 月 5 日
編集済み: Image Analyst
2021 年 11 月 23 日
Try the function findchangepts(), in versions of MATLAB r2016a and later.
0 件のコメント
Palnati saidatta
2021 年 11 月 23 日
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
1 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!