I have matrix A with 1×10 elements and B with 1×125 elements. But elements in B are those elements in A only but randomly distributed. Now I want to get the row number of each element in B corresponding to matrix A.. can anybody help me .. thanks in advance

 채택된 답변

Ive J
Ive J 2020년 12월 8일

0 개 추천

[idxB, idxA] = ismember(B, A);
idxA is index of A members in B.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2020년 12월 8일

답변:

2020년 12월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by