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

📄 mxanthus_attract_func.m

📁 一个用MATLAB编写的优化控制工具箱
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bacteria cell to cell attraction function, M. xanthus% Author: K. Passino% Version: 6/2/00%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function [Jar]=mxanthus_attract_func(x,theta,S,flag)  % Given locations of all bacteria, find Jar for all S bacteria% Note that theta rows are dimensions of the opt. problem, while the columns are% the S different bacteria. For now, designed for p=2if flag==2  % Test to see if main program indicated cell-cell attraction	Jar=0;	returnenddepthattractant=0.1;  % Sets magnitude of secretion of attractant by a cellwidthattractant=0.04;  % Sets how the chemical cohesion signal diffuses (smaller makes it diffuse more)heightrepellant=1*depthattractant; % Sets repellant (tendency to avoid nearby cell)widthrepellant=10;  % Makes small area where cell is relative to diffusion of chemical signalJar=0;for j=1:S			% Set how the cell attracts other cells via secretions of diffusable attractants	Ja=-depthattractant*exp(-widthattractant*((x(1,1)-theta(1,j))^2+(x(2,1)-theta(2,j))^2));	% Set how the cell repells other cells since it eats in its own region (and since an intact	% cell is apparently not food for another cell)	Jr=+heightrepellant*exp(-widthrepellant*((x(1,1)-theta(1,j))^2+(x(2,1)-theta(2,j))^2));	% Next, set the combined effect	Jar=Jar+Ja+Jr;end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

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