MATLAB: how to return records to a vector?

Let's say a = [5; 4; 3; 2; 1], and I need all entries> 3, so I want it to spit out v = [5,4].

I know that “find” only finds indexes, so it doesn't work.

any suggestions?

+3
source share
1 answer

Include the inequality test in the index:

v = a(a>3)
+5
source

Source: https://habr.com/ru/post/1791898/


All Articles