Yes there is; speed! Especially for large arrays, find will be significantly faster.
Think about it: the operation A > val is the same in both cases, but
B = A(A > val)
extracts values ββfrom A and copies them to a new array B , which must be assigned and assigned for copying, and the temporary element A(A> val) must be destroyed.
All find(A>val, 1, 'first') searches for a list of logical elements and returns a single number when it encounters the first true value; it is much less useless copying / assignment / etc, and therefore much faster.
As a rule, when you do not use additional parameters in find , logical indexing is almost always preferable. When you need or use additional find functions, the find option is almost always preferable.
source share