Good day, everyone! I have the following array(1) = [0 0 0 0 0 0 0 0 0 1 2 3 4 5] (14 elements in total, for example) and I can derrive respective indexes of the elements in it. The other array(2) = [12 11 14 5 1] contains a set of indexes for non-zero elements in array(1) (mapping one-to-one – so 1 should have index 12, 2 – index 11, etc.). How can I sort array(1) with respect to indexes in array(2) with no use of loop structure? (I solved it with loop) .
MATLAB: Changing Indexing Order in matrix raws
arrayarraysindexindexingsort
Best Answer