资源简介
是在mathworks广泛论坛上下载的,作者发表过多篇相关论文

代码片段和文件信息
%% Bacterial foraging
% Animiation of bacteria movement to get the global minimum solution every chemotactic
%
% Author: Wael Mansour (wael192@yahoo.com)
%
% MSc Student Electrical Enginering Dept
% Faculty of Engineering Cairo University Egypt
%%
%Initialization
clear all
clc
p=2; % dimension of search space
s=26; % The number of bacteria
Nc=50; % Number of chemotactic steps
Ns=4; % Limits the length of a swim
Nre=4; % The number of reproduction steps
Ned=2; % The number of elimination-dispersal events
Sr=s/2; % The number of bacteria reproductions (splits) per generation
Ped=0.25; % The probabilty that each bacteria will be eliminated/dispersed
c(:1)=0.05*ones(s1); % the run length
for m=1:s % the initital posistions
P(1:111)= 50*rand(s1)‘;
P(2:111)= .2*rand(s1)‘;
%P(3:111)= .2*rand(s1)‘;
end
%%
%Main loop
%Elimination and dispersal loop
for ell=1:Ned
%Reprodution loop
for K=1:Nre
% swim/tumble(chemotaxis)loop
for j=1:Nc
for i=1:s
J(ijKell)=Live_fn(P(:ijKell));
% Tumble
Jlast=J(ijKell);
Delta(:i)=(2*round(rand(p1))-1).*rand(p1);
P(:ij+1Kell)=P(:ijKell)+c(iK)*Delta(:i)/sqrt(Delta(:i)‘*Delta(:i)); % This adds a unit vector in the random direction
% Swim (for bacteria that seem to be headed in the right direction)
J(ij+1Kell)=Live_fn(P(:ij+1Kell));
m=0; % Initialize counter for swim length
while m m=m+1;
if J(ij+1Kell) Jlast=J(ij+1Kell);
P(:ij+1Kell)=P(:ij+1Kell)+c(iK)*Delta(:i)/sqrt(Delta(:i)‘*Delta(:i)) ;
J(ij+1Kell)=Live_fn(P(:ij+1Kell));
else
m=Ns ;
end
end
J(ijKell)=Jlast;
sprintf(‘The value of interation i %3.0f j = %3.0f K= %3.0f ell= %3.0f‘ i j K ell );
end % Go to next bacterium
x = P(1:jKell);
y = P(2:jKell);
clf
plot(x y ‘h‘)
axis([-5 5 -5 5]);
pause(.1)
end % Go to the next chemotactic
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5211 2008-06-08 16:42 BG_Wael\BG.asv
文件 4598 2008-06-08 19:34 BG_Wael\BG.m
目录 0 2008-06-08 19:38 BG_Wael\html\
文件 12374 2008-06-08 19:37 BG_Wael\html\BG.html
文件 1234 2008-06-08 19:37 BG_Wael\html\BG.png
文件 3022 2008-06-08 19:37 BG_Wael\html\BG_01.png
文件 5632 2008-06-08 19:38 BG_Wael\html\Thumbs.db
文件 184 2008-06-07 00:36 BG_Wael\Live_fn.m
目录 0 2008-06-08 19:00 BG_Wael\
- 上一篇:基于全相位频谱的fft
- 下一篇:恒模滤波算法针对4QAM
相关资源
- 混沌时间序列分析工具箱
- Excel必备工具箱16.0.rar
- 断崖水刀工具箱 v5.1.zip
- 林智仁教授最新版本LibSVM工具箱
- 红蜘蛛黑客工具箱.zip
- 谱峭度工具箱
- 燕秀工具箱 v2.81.zip
- lisp源代码 ***工具箱代码 cad二次开发
- 脉冲耦合神经网络工具箱PCNN-toolbox
- CAD插件 ***工具箱全集 全破解
- 恶意软件分析诀窍与工具箱.zip
- 网络修复工具箱
- 很好用的CAD插件,可以节省很多绘图
- CAD插件海龙工具箱绿色破解版
- 数据仓库ETL工具箱
- bellhop水声信道仿真工具箱及说明书
- 基于svm四种工具箱
- 算法和数据结构:基本工具箱Kurt Me
- 计量经济学工具箱用户手册
- 双谱工具箱_安装文件.zip
- 轻松工具箱V7.8(含注册机)
- 网上能下到的最好的2种HHT,附加EMD工
- 数据仓库生命周期工具箱英文版
- 分形分析工具箱 - FracLab2.04
- 格兰杰因果分析工具箱介绍MVGC
- arcgis三调工具箱.zip
- MPC5634驱动工具箱用户使用手册
- 京东查排名查忽略查评价查快递工具
- SVM工具箱,用于数据的回归、预测以
- ninteger 分数阶
评论
共有 条评论