Effacer les filtres
Effacer les filtres

Find identical rows in matrices

4 vues (au cours des 30 derniers jours)
Ahmed Abdulla
Ahmed Abdulla le 8 Juin 2022
Modifié(e) : KSSV le 8 Juin 2022
I have matrix A (1000x3) and matrix B (1200x3), is there an easy way to know what rows of matrix A already exist in Matrix B. Any help is appreciated

Réponse acceptée

KSSV
KSSV le 8 Juin 2022
Modifié(e) : KSSV le 8 Juin 2022
REad about ismember
% Example
A = [1 1 1; 2 3 4; 5 5 5; 8 9 10];
B = [1 1 1;5 5 5];
[c,ia] = ismember(A,B,'rows') ;
A(c,:)
ans = 2×3
1 1 1 5 5 5

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by