⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mutation.m

📁 Real Genetic Algorithm RGA
💻 M
字号:

% -------------------- Mutation Function ----------------------

function[Population]=Mutation(End_points,Start_points,Next_Gen,N,Gen_num,Mutation_rate)
for i=1:N
    for j=1:Gen_num
        r1=rand;
        if r1<=Mutation_rate
           Next_Gen(i,j)=Start_points(j)+(End_points(j)-Start_points(j))*rand;
        end
    end
end
Population=Next_Gen;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -