Hi everyone, My question is, how can I change matrix b to c?
c shows the position of b in a.
a=[18 11 12 14 10 15]
b=[10 14 12 15
12 11 12 18
11 14 18 15
18 11 15 18]
c=[5 4 3 6
3 2 3 1
2 4 1 6
1 2 6 1]
Thank you in advance for any advice you can offer.

 채택된 답변

Walter Roberson
Walter Roberson 2018년 2월 7일

0 개 추천

[~, c] = ismember(b, a);

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by