-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresplot.m
28 lines (19 loc) · 892 Bytes
/
resplot.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
25
26
27
28
function resplot(Chrom,IndAll,ObjV,Best,gen);
% plot of best and mean value per generation
subplot(2,2,1), plot(Best);
title('Best and mean objective value');
xlabel('generation'), ylabel('objective value');
% plot of best individuals in all generations
subplot(2,2,2), plot(IndAll);
title(['Best individuals']);
xlabel('generation'), ylabel('value of variable');
% plot of variables of all individuals in current generation
subplot(2,2,3), plot(Chrom');
title(['All individuals in gen ',num2str(gen)]);
xlabel('number of variable'), ylabel('value of variable');
% plot of all objective values in current generation
subplot(2,2,4), plot(ObjV,'y.');
title(['All objective values']);
xlabel('number of individual'), ylabel('objective value');
drawnow;
% End of function