📄 mutation.m
字号:
function child=mutation(father,p)
[n,m]=size(father);
for i=1:n
if rand<p
j=round(rand*(m-1))+1;
if father(i,j)==0
father(i,j)=1;
elseif father(i,j)==1
father(i,j)=0;
end
else continue;
end
end
child=father;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -