Check for array equality?
2 次查看(过去 30 天)
显示 更早的评论
How can I check if indices of three arrays are equal and make those indices all zero if they are equal.
2 个评论
James Tursa
2015-2-3
Please provide a short example of your request. E.g., give three arrays and the desired output.
采纳的回答
John D'Errico
2015-2-4
Not sure what the problem is. Why not just this?
ind = (A==B) && (A == C);
A(ind) = 0;
B(ind) = 0;
C(ind) = 0;
If this is not the answer, then you need to explain yourself FAR more clearly.
John
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!