How to extract specific rows from matrix by matching with other matrix?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have two matrices. One is a two-column matrix of (i,j) pairs containing 1440 rows. The other matrix is 2878 rows, with the first two columns also containing some of the same (i,j) pairs and the other columns containing useful data. I'd like to produce a new matrix that only contains the (i,j) pairs from the smaller matrix with the corresponding data from the larger matrix. Essentially, i want to find matches from the small matrix in the large matrix and add only those rows to a new matrix. In the snips below, I'd like to output only the highlighted rows in the larger matrix, because those are a match for the smaller matrix.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/899240/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/899245/image.png)
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!