Extract 5 highest value of a vector

조회 수: 2 (최근 30일)
Francesco
Francesco 2014년 2월 26일
편집: Andrei Bobrov 2014년 2월 26일
If I want to extract the indices of the 5 highest value of a avg vector (30x1 for example) how can I do?
ind = find(avgDE... )

채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 2월 26일
편집: Andrei Bobrov 2014년 2월 26일
[a,ii] = sort(avgDE,'descend');
outidx = ii(1:5);

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by