How to add numbers to indexes

1 次查看(过去 30 天)
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?

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-6-17
idx=[2 3 4 5 1 6 7]
numb=[1 4 6 8 3 7 9]
numb(idx)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by