Find missing elements from table
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
DIMITRA GIANNOPOULOU
am 3 Jun. 2018
Beantwortet: Jan
am 3 Jun. 2018
Hi everybody,
I have a vector A = [1 ;2;3;4;5;6;7;8] and a Matrix B=[1 2; 1 8 ; 2 8] and I want to find the missing elements of A from B. How can I solve this?
2 Kommentare
Ameer Hamza
am 3 Jun. 2018
Which elements of A are missing? Give a proper example that which elements and how do you want to fill it from B.
Akzeptierte Antwort
Jan
am 3 Jun. 2018
A = [1;2;3;4;5;6;7;8]
B = [1 2; 1 8 ; 2 8]
C = intersect(A, B)
Or if you want to keep repeated values:
C = A(ismember(A, B))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!