nmbr_of_members.m

来自「一些用matlab编写的经典遗传算法算例 挺有用的」· M 代码 · 共 13 行

M
13
字号
function n = nmbr_of_members(chr,name)
% NMBR_OF_MEMBERS - find the numbers of members in the population given the name.
%   
tmp=find(chr,name);
if tmp(1)~=0
  n=length(tmp);
else
  n=0;
end


  

⌨️ 快捷键说明

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