How to find an array with all common elements?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mariam Shahab
le 25 Nov 2022
Commenté : Mariam Shahab
le 25 Nov 2022
Hi all,
Suppose I have the following two arrays:
a= [1 1 1 0 1];
b= [1 0 1 1 0];
I want to find an array that contains each element common to both a and b. So, the elements can be repeated and they have to be in order. I will appreciate any help on this. Thanks!
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!