MATLAB: how do I return entries in a vector?
Let's say a=[5;4;3;2;1] an开发者_JS百科d I want all entries > 3, so I want it to spit out v=[5,4].
I know "find" only finds the indices, so it doesn't exactly work.
any suggestions?
Include the inequality test in the index:
v = a(a>3)
精彩评论