Check for array equality?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can I check if indices of three arrays are equal and make those indices all zero if they are equal.
2 commentaires
James Tursa
le 3 Fév 2015
Please provide a short example of your request. E.g., give three arrays and the desired output.
Réponse acceptée
John D'Errico
le 4 Fév 2015
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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!