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

📄 mate.m

📁 基本遗传算法程序包
💻 M
字号:
function [new_gen,mating] = mate(old_gen)%MATE   Randomly reorders (mates) OLD_GEN.%	[NEW_GEN,MATING] = MATE(OLD_GEN) performs random reordering%       on OLD_GEN.  NEW_GEN is the new reordering.  Individual in %       row 1 is to be mated with individual in row 2, etc.  MATING%       is the reordering vector (ie: new_gen=old_gen(mating,:)).%%	Copyright (c) 1993 by the MathWorks, Inc.%	Andrew Potvin 1-10-93.[junk,mating] = sort(rand(size(old_gen,1),1));new_gen = old_gen(mating,:);% end mate

⌨️ 快捷键说明

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