-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGetCosts.m
24 lines (20 loc) · 1.16 KB
/
GetCosts.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MATLAB Code for %
% %
% Non-dominated Sorting Genetic Algorithm II (NSGA-II) %
% Version 1.0 - April 2010 %
% %
% Programmed By: S. Mostapha Kalami Heris %
% %
% e-Mail: [email protected] %
% %
% Homepage: http://www.kalami.ir %
% %
% GetCosts.m : gathers cost information of a population %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function costs=GetCosts(pop)
nobj=numel(pop(1).Cost);
costs=reshape([pop.Cost],nobj,[]);
end