Effacer les filtres
Effacer les filtres

Comparing Contents of Two Matrices

1 vue (au cours des 30 derniers jours)
Rightia Rollmann
Rightia Rollmann le 12 Août 2016
Réponse apportée : Guillaume le 12 Août 2016
How to determine if all elements of A are present in B, in the simplest way?
A = [ 1 2 3 ];
B = [ 1 2 3 4 5 6 7 8 9 10 ];

Réponse acceptée

Guillaume
Guillaume le 12 Août 2016
all(ismember(A, B))

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional 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!

Translated by