MATLAB Answers

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

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

  댓글 수: 1

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 님의 답변 19 Sep 2019
thoughtGarden 님이 편집함. 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');
If you found this answer to be correct, please accept it. Otherwise, please add aditional comments so that it may be improved.

  댓글 수: 0

로그인 to comment.



Translated by