How do I find the last element in a increasing matrix that is less than a particular number. For example if my matrix is A=[ 1 2 3 4 6 8 9] And I want the last number that is less than 7. So I want to find the position of 6 and not any other number like 1,2,3,4.
Neeta Dsouza answered .
2025-11-20
find(A < 7,1,'last')