How do I find the submatrix of a matrix?
古いコメントを表示
I'm new to Matlab so bear with me.
If I have a 2D matrix A and a submatrix B of A. How can I check if B is a submatrix of A?
I basically want to search for matrix B in A.
An example with code would be appreciated :)
採用された回答
その他の回答 (1 件)
[R,P] = ismember(B,A)
if R contains all ones then B is a submatrix of A and P contains the indices of A where B is located, ie A(P) = B
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!