MATLAB: Check for decrease and increase

decrease

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.

Best Answer

Read about diff. This will get the difference of successive rows. If decreasing diff would be negative, if increasing diff will be positive.