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.
我有一个 n*n 大小的 ex A 的巨大稀疏矩阵,我想从巨大的矩阵中找到一些值的数组 B (1*m 大小)的索引,并将这些值替换为一个值,例如 x ?我不想使用循环,这怎么可能?
谢谢
看一下这个:
A(find(ismember(A,b))) = NaN
PS:NaN只是作为一个例子,你当然可以调整值。
NaN