MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   Mathematica论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=34)
-   -   [问题] find函数怎么不能准确给出符合标准的数据位置呢 (https://www.labfans.com/bbs/showthread.php?t=14449)

cea-ies 2012-03-22 17:30

find函数怎么不能准确给出符合标准的数据位置呢
 
我有如下这一列数,想找到所有>=0.08的数的个数,因此用了find函数,结果给出的答案是5个位置,实际上有7个位置,不知道为什么把另外两个过滤了。那个细心人碰到过这类问题,感谢帮助。
假定变量名为d,
>> find(d>=0.08)

ans =

12
13
22
23
26
>> length(d(d>=0.08))

ans =

5

数据:
0.0300
0.0100
0
0.0300
0.0300
0.0100
0
0.0100
0.0200
0.0300
0.0100
0.0800
0.1100
0.0500
0.0800
0.0700
0.0100
0
0
0.0400
0.0200
0.0800
0.0800
0.0100
0.0800
0.1500
0.0500
0.0300
0.0800
0.0200


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

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