MATLAB - how do I find the first index where value is greater than threshold [duplicate]
Date: 2022-07-07 11:56:21
Possible Duplicate:
Given a vector a=[1,2, 3.2, 4, 5] and an element x=3 In vector a, how to find the exact entry which is bigger than x?
Let's say a[] is a sorted vector. How do I find the first(smallest) index ix such that a(ix) > threshold?
Answers:
ix = find(a>threshold,1);
Pretty sure this will work