开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜