check for decrease and increase
37 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
johnson saldanha
el 5 de Nov. de 2018
Comentada: Image Analyst
el 23 de Nov. de 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 comentarios
Respuesta aceptada
KSSV
el 5 de Nov. de 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 comentarios
Más respuestas (3)
madhan ravi
el 5 de Nov. de 2018
Editada: madhan ravi
el 5 de Nov. de 2018
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
0 comentarios
Image Analyst
el 5 de Nov. de 2018
Editada: Image Analyst
el 23 de Nov. de 2021
Try the function findchangepts(), in versions of MATLAB r2016a and later.
0 comentarios
Palnati saidatta
el 23 de Nov. de 2021
x=[100:-5:0] %an example
issorted(x,'strictdescend') %to check if they are sorted
abs(diff(x))==5
1 comentario
Image Analyst
el 23 de Nov. de 2021
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!