MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   MATLAB:如何返回向量中的条目? (https://www.labfans.com/bbs/showthread.php?t=26333)

poster 2019-12-14 20:13

MATLAB:如何返回向量中的条目?
 
假设a = [5; 4; 3; 2; 1],并且我希望所有条目> 3,所以我希望它吐出v = [5,4]。

我知道“查找”只能找到索引,因此它并不完全有效。

有什么建议么?



[B]回答:[/B]

在索引中包括不平等检验:

v = a(a>3)

[url=https://stackoverflow.com/questions/4987913]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 03:00

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.