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

📄 set_norm_cell.m

📁 多智能体工具包
💻 M
字号:
function set_norm_cell(Class_Id)% SET_NORM_CELL	Initialize the CELL matrix of the normal CLASS.%     Copyright (c) 1997-2000 Jiming Liu and Jianbing Wuglobal HISTORY CELL;global Robot_Distrib Object_Distrib;Cell_Num=get_cell_num(Class_Id);if Class_Id~=3  Low_Limit=Robot_Distrib(1);  Region_Limit=Robot_Distrib(2)-Robot_Distrib(1);else  Low_Limit=Object_Distrib(1);  Region_Limit=Object_Distrib(2)-Object_Distrib(1);endif Cell_Num  Random_Position=random_create_cell(Cell_Num,Region_Limit,Low_Limit);  Number=0;  for mm=1:Cell_Num    Number=Number+1;    Current_X=Random_Position(mm,1);    Current_Y=Random_Position(mm,2);    CELL=[CELL;Class_Id Number Current_X Current_Y];%    HISTORY=[HISTORY;Class_Id Number 0 Random_Position(mm,:)];  endend

⌨️ 快捷键说明

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