This should not work in general. It returns false-positive for consecutive 1 5 7 :-)
Arrange Vector in descending order
4076 Solvers
Sum of diagonal of a square matrix
1327 Solvers
Flag largest magnitude swings as they occur
582 Solvers
669 Solvers
84 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!