How to filter out multiple rows based on another array?

1 vue (au cours des 30 derniers jours)
JFz
JFz le 18 Août 2017
Commenté : JFz le 18 Août 2017
I have two arrays, a, b, one has numbers from 1,2, to 12. The other has 5 numbers 3,4, to 7. I want to filter out the rows in a that are not in b. How to do that? Thanks in advance.

Réponse acceptée

James Tursa
James Tursa le 18 Août 2017
result = a(ismember(a,b));

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by