MATLAB: How to add numbers to indexes

indexing

I have an array of indexes eg [2 3 4 5 1 6 7]. I have an array of numbers [1 4 6 8 3 7 9].
I would like to assign the numbers according to the indexes in one command. Is it possible?

Best Answer

idx=[2 3 4 5 1 6 7]
numb=[1 4 6 8 3 7 9]
numb(idx)