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

📄 set.m

📁 一些用matlab编写的经典遗传算法算例 挺有用的
💻 M
字号:
function g = set(cdv,varargin)
% GEN_SETVALUE - Set the value, fitness, of the gen
%   
tst=nargin;
if tst==1
  set(cdv.gen)
  fprintf('l_limit\nu_limit\n')
else
  for k=1:2:nargin-1
    switch varargin{k}
     case 'l_limit'
      cdv.l_limit=varargin{k+1};
     case 'u_limit'
      cdv.u_limit=varargin{k+1};
     otherwise
      cdv.gen=set(cdv.gen,varargin{k},varargin{k+1});
    end
  end
  g=cdv;
end

⌨️ 快捷键说明

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