check for decrease and increase
34 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
johnson saldanha
il 5 Nov 2018
Commentato: Image Analyst
il 23 Nov 2021
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 Commenti
Risposta accettata
KSSV
il 5 Nov 2018
Read about diff. This will get the difference of successive rows. If decreasing diff would be negative, if increasing diff will be positive.
0 Commenti
Più risposte (3)
madhan ravi
il 5 Nov 2018
Modificato: madhan ravi
il 5 Nov 2018
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
0 Commenti
Image Analyst
il 5 Nov 2018
Modificato: Image Analyst
il 23 Nov 2021
Try the function findchangepts(), in versions of MATLAB r2016a and later.
0 Commenti
Palnati saidatta
il 23 Nov 2021
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
1 Commento
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!