Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我想在下面的向量中获取 null 的位置。
a=1 NULL 2 3 6 NULL 2 NULL
我尝试了以下脚本:
re=isNull(a) index=array(int,0,1) for(i in 1..size(a)){ if(re[i]==true){ index.append!(i) } } print index
但是向量很大时性能很差,有没有其他方法?
试试下面的代码
at(a==NULL)