Find missing elements from table
조회 수: 14 (최근 30일)
이전 댓글 표시
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
Ameer Hamza
2018년 6월 3일
Which elements of A are missing? Give a proper example that which elements and how do you want to fill it from B.
채택된 답변
Jan
2018년 6월 3일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!