MATLAB: Finding positions and comparing two arrays

comparingposition;

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.

Best Answer

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