How to find repeated array in a matrix
1 回表示 (過去 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!