📄 bact_cellcell_attract.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bacterial cell-to-cell attraction function% Author: K. Passino% Version: 5/16/00%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%x=0:31/200:30; % For our function the range of values we are consideringy=x;% Compute the function that we are trying to find the minimum of.theta(:,1)=[15; 15]; % Just put at middletheta(:,2)=[15; 20]; % Put next to itfor jj=1:length(x) for ii=1:length(y) z(ii,jj)=bact_cellcell_attract_func([x(jj);y(ii)],theta,2,0); endendfigure(1)clfsurf(x,y,z);colormap(jet)% Use next line for generating plots to put in black and white documents.colormap(white);view(-53,78)xlabel('x=\theta_1');ylabel('y=\theta_2');zlabel('z=J');title('Cohesion-repulsion function');zoom(2)%rotate3d onfigure(2)clfcontour(x,y,z,25)colormap(jet)xlabel('x=\theta_1');ylabel('y=\theta_2');title('Cohesion-repulsion function for two cells');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -