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

📄 impfit.m

📁 一些用matlab编写的经典遗传算法算例。可以用于解决许多优化问题
💻 M
字号:
function fitness = impfit(fname)
% IMPORT - imports the fitness from a file
%   fitness = impfit('fname') where fname is the name of the
%   file. The order of the fitness is the same as the order of the
%   chromosomes sent to evaluation.
% 
% See also EXPORT
res=[];
fid=fopen(fname);
while 1
  tmp=fgetl(fid);
  if ~ischar(tmp)
    break
  else
   res=[res str2num(tmp)];
  end
end
fitness=res;

⌨️ 快捷键说明

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