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

📄 find.m

📁 一些用matlab编写的经典遗传算法算例。可以用于解决许多优化问题
💻 M
字号:
function ind = find(chr,name)
% FIND - finds the index of a chromosome with a specific name in an array.
% index=find(chr,'name') if the chromosome is not found the function
% returns zero
ind=[];
for k=1:length(chr)
  if strcmp(chr(k).name,name);
    ind=[ind k];
  end
end
if isempty(ind)
  ind=0;
end

⌨️ 快捷键说明

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