📄 normal.m
字号:
function NewChrom=normal(TheChrom)
% NORMAL Normalize the chromosome after the mutation.
% Copyright (c) 1998-2000 Jiming Liu and Jianbing Wu
global RobotNum PopulationSize;
NewValue=[];
for loops=1:PopulationSize
RealValue=getreal(TheChrom(loops,:));
ForSort=RealValue(1:RobotNum)';
[SortedValue,Sequence]=sort(ForSort);
CurrentValue=SortedValue';
for loop1=1:RobotNum
CurrentValue=[CurrentValue RealValue(RobotNum+Sequence(loop1))];
end;
NewValue=[NewValue;CurrentValue];
end;
NewChrom=getchrom(NewValue);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -