Hi, I need to find all blocks of numbers (less than a specific value) with consecutive locations in an array. For example, I have [12 13 14 15 13 12 4 5 4 6 11 10 10 3 9 10 11 2 1 5], and want to get all blocks of numbers less than 7: [4 5 4 6], [3], [2 1 5]. How can I achieve it in a efficient way? Thank you very much!
MATLAB: How to find all blocks of numbers with consecutive locations which are less than a value in an array
consecutive locationsfind
Best Answer