## How to order 'n' no of populations in ascending order based on their fitness for a minimization objective in matlab

dhiman banerjee

### dhiman banerjee (view profile)

님이 질문을 제출함. 19 Sep 2019
최근 활동 dhiman banerjee

### dhiman banerjee (view profile)

님이 댓글을 추가함. 20 Sep 2019
thoughtGarden

### thoughtGarden (view profile)

님이 답변을 채택함.
How to order 'n' no of populations in ascending order based on their fitness for a minimization objective in matlab?

dhiman banerjee

### dhiman banerjee (view profile)

20 Sep 2019
Thank you for the reply. But this code gives fitness value of te each population in acending order. My problem is - that to reorder each population (i.e rows of the population matrix) as per the fitness value of each population in ascending order (Minimization objective)
Kindly help me in this point.

로그인 to comment.

### 태그

아직 태그를 입력하지 않았습니다.

## 답변 수: 1

thoughtGarden

### thoughtGarden (view profile)

님의 답변 19 Sep 2019
thoughtGarden

### thoughtGarden (view profile)

님이 편집함. 20 Sep 2019
채택된 답변

I'm assuming you already have the fitness of each population according to the minimization objective. If this is the case, you will simply obtain the index order from the "sort" function while using the "direction" parameter.
sortedIndex = sort(fitnessVector, [],'ascend');