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

📄 replace.m

📁 模糊聚类算法
💻 M
字号:
function r1=replace(holdm,v1,hist,c,population,f)
%%子优代父,基于浓度的群体更新
tempP=rand(1);%生成0-1间的随机数
C=0.5;%抗体浓度
a=0.3;%参数1
b=0.5;%参数2

    father=f;
    for i=1:population
        [V(i,:),f(i)]=fcm(hist,c,v1(i,:));
    end
    child=f;
    Ps=a*C*abs(1-f./max(f))+b*f./max(f);%基于浓度更新的公式
    hold=v1;
    for i=1:population
       if child(i)>father(i) & tempP<Ps
          hold(i)=v1(i);
       else hold(i)=holdm(i);
      end
   end
   r1=hold;

⌨️ 快捷键说明

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