check for decrease and increase
Show older comments
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.
Accepted Answer
More Answers (3)
madhan ravi
on 5 Nov 2018
Edited: madhan ravi
on 5 Nov 2018
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
Image Analyst
on 5 Nov 2018
Edited: Image Analyst
on 23 Nov 2021
1 vote
Try the function findchangepts(), in versions of MATLAB r2016a and later.
Palnati saidatta
on 23 Nov 2021
0 votes
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
1 Comment
Image Analyst
on 23 Nov 2021
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!