How to add numbers to indexes

조회 수: 1 (최근 30일)
Anuradha
Anuradha 2016년 6월 17일
답변: Azzi Abdelmalek 2016년 6월 17일
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