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.
我有两个向量
g_counter = [2 0]
和
list = [3 0]
我会得到这个:
g_counter
list
2向量中的相应值list不为零,所以我不会得到它。我会得到向量0中的相应值list等于零
2
0
获取该元素在g_counter向量中的索引。
据我了解,您应该这样做:
zeros=find(list==0); g_counter(zeros) %this will print the values for which the index is 0 in the vector list