How to find repeated array in a matrix
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello everyone,
Suppose matrix a is like:
a=[1;2;2;3;3;4;5;6;6;7;7;7;8];
and matrix b:
b=[2;7;1;3;2];
Then, I want matrix c to be like:
c = [2;3;10,11,12,1,4,5,2,3]
Matrix c is found an array of matrix b in matrix a, If it finds more than one, then it will write both or more row numbers in the matrix c
댓글 수: 0
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2014년 7월 9일
편집: Azzi Abdelmalek
2014년 7월 9일
You can use ismember and find function
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!