How can I normalize a data between 0-1 without having its maximum value?
Hello to all
I want to write the following formula code (population density) in MATLAB for an optimization algorithm. As a rule, this parameter is different in each generation depending on the new population.
I have two questions:
1) Is the code I wrote correct? I don't know why the numbers obtained from this formula are very close to each other in each generation.
2) How can I normalize this parameter in each generation? Its maximum value is not determined until all generations are executed.
the code is:
summ11=0;
summ1=0;
for i=1:numel(pop)-1
for j=i+1:numel(pop)
y=pop(i).position-pop(j).position;
D=numel(y);
for jj=1:D
summ1= summ1+(y(jj)^2/(varmax(jj)-varmin(jj)));
end
summ11=sqrt(summ1);
end
summ11=summ1+summ11;
end
div1= summ11;
div123=div1/((2*D*(numel(pop)-1)*numel(pop)));
H and L are upper bound and lower bound of design variables respectively.
d is the number of design variables and n is population size.
7 commentaires
Réponses (1)
Voir également
Catégories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!